Merge lp:~abreu-alexandre/oxide/add-devtools-support into lp:~oxide-developers/oxide/oxide.trunk

Proposed by Alexandre Abreu
Status: Merged
Merged at revision: 618
Proposed branch: lp:~abreu-alexandre/oxide/add-devtools-support
Merge into: lp:~oxide-developers/oxide/oxide.trunk
Diff against target: 1113 lines (+778/-6)
21 files modified
qt/core/api/oxideqwebpreferences.h (+1/-0)
qt/core/glue/oxide_qt_web_context_adapter.cc (+31/-0)
qt/core/glue/oxide_qt_web_context_adapter.h (+6/-0)
qt/core/glue/oxide_qt_web_context_adapter_p.h (+2/-0)
qt/core/glue/private/oxide_qt_web_context_adapter_p.cc (+10/-2)
qt/quick/api/oxideqquickwebcontext.cc (+36/-0)
qt/quick/api/oxideqquickwebcontext_p.h (+10/-0)
shared/browser/oxide_browser_context.h (+14/-2)
shared/browser/oxide_browser_context_impl.cc (+34/-1)
shared/browser/oxide_browser_context_impl.h (+10/-0)
shared/browser/oxide_devtools_http_handler_delegate.cc (+124/-0)
shared/browser/oxide_devtools_http_handler_delegate.h (+71/-0)
shared/browser/oxide_devtools_target.cc (+125/-0)
shared/browser/oxide_devtools_target.h (+72/-0)
shared/browser/oxide_off_the_record_browser_context_impl.cc (+9/-0)
shared/browser/oxide_off_the_record_browser_context_impl.h (+3/-0)
shared/browser/oxide_web_view.cc (+54/-1)
shared/browser/oxide_web_view.h (+4/-0)
shared/browser/resources/devtools_discovery_page.html (+155/-0)
shared/oxide_resources.grd (+1/-0)
shared/shared.gyp (+6/-0)
To merge this branch: bzr merge lp:~abreu-alexandre/oxide/add-devtools-support
Reviewer Review Type Date Requested Status
Chris Coulson Approve
Review via email: mp+223239@code.launchpad.net

Commit message

Add devtools support

Description of the change

Add devtools support

To post a comment you must log in.
614. By Alexandre Abreu

remove leftover clutter

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Left my comments inline :)

review: Needs Fixing
615. By Alexandre Abreu

fixes

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

Thank you for the review,
I updated the MR,

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks! Almost there, I've just added a few minor comments

review: Needs Fixing
616. By Alexandre Abreu

fixes

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

I updated the MR,

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, this is good to merge now :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qt/core/api/oxideqwebpreferences.h'
--- qt/core/api/oxideqwebpreferences.h 2014-05-26 22:12:33 +0000
+++ qt/core/api/oxideqwebpreferences.h 2014-06-24 11:52:03 +0000
@@ -139,6 +139,7 @@
139 void setTouchEnabled(bool enabled);139 void setTouchEnabled(bool enabled);
140140
141 Q_SIGNALS:141 Q_SIGNALS:
142
142 void standardFontFamilyChanged();143 void standardFontFamilyChanged();
143 void fixedFontFamilyChanged();144 void fixedFontFamilyChanged();
144 void serifFontFamilyChanged();145 void serifFontFamilyChanged();
145146
=== modified file 'qt/core/glue/oxide_qt_web_context_adapter.cc'
--- qt/core/glue/oxide_qt_web_context_adapter.cc 2014-06-02 21:56:59 +0000
+++ qt/core/glue/oxide_qt_web_context_adapter.cc 2014-06-24 11:52:03 +0000
@@ -81,6 +81,37 @@
81 }81 }
82}82}
8383
84bool WebContextAdapter::devtoolsEnabled() const {
85 if (isInitialized()) {
86 return priv->context_->GetDevtoolsEnabled();
87 }
88 return priv->construct_props_->devtools_enabled;
89}
90
91void WebContextAdapter::setDevtoolsEnabled(bool enabled) {
92 if (isInitialized()) {
93 qWarning() << "Cannot change the devtools enabled after inititialization";
94 return;
95 }
96 priv->construct_props_->devtools_enabled = enabled;
97}
98
99int WebContextAdapter::devtoolsPort() const {
100 if (isInitialized()) {
101 return priv->context_->GetDevtoolsPort();
102 }
103
104 return priv->construct_props_->devtools_port;
105}
106
107void WebContextAdapter::setDevtoolsPort(int port) {
108 if (isInitialized()) {
109 qWarning() << "Cannot change the devtools port after inititialization";
110 return;
111 }
112 priv->construct_props_->devtools_port = port;
113}
114
84QUrl WebContextAdapter::dataPath() const {115QUrl WebContextAdapter::dataPath() const {
85 base::FilePath path;116 base::FilePath path;
86 if (isInitialized()) {117 if (isInitialized()) {
87118
=== modified file 'qt/core/glue/oxide_qt_web_context_adapter.h'
--- qt/core/glue/oxide_qt_web_context_adapter.h 2014-04-02 19:57:47 +0000
+++ qt/core/glue/oxide_qt_web_context_adapter.h 2014-06-24 11:52:03 +0000
@@ -105,6 +105,12 @@
105 bool popupBlockerEnabled() const;105 bool popupBlockerEnabled() const;
106 void setPopupBlockerEnabled(bool enabled);106 void setPopupBlockerEnabled(bool enabled);
107107
108 bool devtoolsEnabled() const;
109 void setDevtoolsEnabled(bool enabled);
110
111 int devtoolsPort() const;
112 void setDevtoolsPort(int port);
113
108 protected:114 protected:
109 WebContextAdapter(QObject* q,115 WebContextAdapter(QObject* q,
110 IOThreadDelegate* io_delegate,116 IOThreadDelegate* io_delegate,
111117
=== modified file 'qt/core/glue/oxide_qt_web_context_adapter_p.h'
--- qt/core/glue/oxide_qt_web_context_adapter_p.h 2014-04-02 19:57:47 +0000
+++ qt/core/glue/oxide_qt_web_context_adapter_p.h 2014-06-24 11:52:03 +0000
@@ -69,6 +69,8 @@
69 net::StaticCookiePolicy::Type cookie_policy;69 net::StaticCookiePolicy::Type cookie_policy;
70 content::CookieStoreConfig::SessionCookieMode session_cookie_mode;70 content::CookieStoreConfig::SessionCookieMode session_cookie_mode;
71 bool popup_blocker_enabled;71 bool popup_blocker_enabled;
72 bool devtools_enabled;
73 int devtools_port;
72 };74 };
7375
74 static WebContextAdapterPrivate* Create(76 static WebContextAdapterPrivate* Create(
7577
=== modified file 'qt/core/glue/private/oxide_qt_web_context_adapter_p.cc'
--- qt/core/glue/private/oxide_qt_web_context_adapter_p.cc 2014-04-02 19:57:47 +0000
+++ qt/core/glue/private/oxide_qt_web_context_adapter_p.cc 2014-06-24 11:52:03 +0000
@@ -38,13 +38,19 @@
38#include "../oxide_qt_user_script_adapter.h"38#include "../oxide_qt_user_script_adapter.h"
39#include "../oxide_qt_user_script_adapter_p.h"39#include "../oxide_qt_user_script_adapter_p.h"
4040
41namespace {
42const unsigned kDefaultDevtoolsPort = 8484;
43}
44
41namespace oxide {45namespace oxide {
42namespace qt {46namespace qt {
4347
44WebContextAdapterPrivate::ConstructProperties::ConstructProperties() :48WebContextAdapterPrivate::ConstructProperties::ConstructProperties() :
45 cookie_policy(net::StaticCookiePolicy::ALLOW_ALL_COOKIES),49 cookie_policy(net::StaticCookiePolicy::ALLOW_ALL_COOKIES),
46 session_cookie_mode(content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES),50 session_cookie_mode(content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES),
47 popup_blocker_enabled(true) {}51 popup_blocker_enabled(true),
52 devtools_enabled(false),
53 devtools_port(kDefaultDevtoolsPort) {}
4854
49// static55// static
50WebContextAdapterPrivate* WebContextAdapterPrivate::Create(56WebContextAdapterPrivate* WebContextAdapterPrivate::Create(
@@ -204,7 +210,9 @@
204 oxide::BrowserContext::Params params(210 oxide::BrowserContext::Params params(
205 construct_props_->data_path,211 construct_props_->data_path,
206 construct_props_->cache_path,212 construct_props_->cache_path,
207 construct_props_->session_cookie_mode);213 construct_props_->session_cookie_mode,
214 construct_props_->devtools_enabled,
215 construct_props_->devtools_port);
208 context_ = oxide::BrowserContext::Create(params);216 context_ = oxide::BrowserContext::Create(params);
209217
210 if (!construct_props_->product.empty()) {218 if (!construct_props_->product.empty()) {
211219
=== modified file 'qt/quick/api/oxideqquickwebcontext.cc'
--- qt/quick/api/oxideqquickwebcontext.cc 2014-06-05 09:51:42 +0000
+++ qt/quick/api/oxideqquickwebcontext.cc 2014-06-24 11:52:03 +0000
@@ -680,4 +680,40 @@
680 }680 }
681}681}
682682
683bool OxideQQuickWebContext::devtoolsEnabled() const {
684 Q_D(const OxideQQuickWebContext);
685
686 return d->devtoolsEnabled();
687}
688
689void OxideQQuickWebContext::setDevtoolsEnabled(bool enabled) {
690 Q_D(OxideQQuickWebContext);
691
692 if (d->devtoolsEnabled() == enabled) {
693 return;
694 }
695
696 d->setDevtoolsEnabled(enabled);
697
698 emit devtoolsEnabledChanged();
699}
700
701int OxideQQuickWebContext::devtoolsPort() const {
702 Q_D(const OxideQQuickWebContext);
703
704 return d->devtoolsPort();
705}
706
707void OxideQQuickWebContext::setDevtoolsPort(int port) {
708 Q_D(OxideQQuickWebContext);
709
710 if (d->devtoolsPort() == port) {
711 return;
712 }
713
714 d->setDevtoolsPort(port);
715
716 emit devtoolsPortChanged();
717}
718
683#include "moc_oxideqquickwebcontext_p.cpp"719#include "moc_oxideqquickwebcontext_p.cpp"
684720
=== modified file 'qt/quick/api/oxideqquickwebcontext_p.h'
--- qt/quick/api/oxideqquickwebcontext_p.h 2014-04-02 22:32:27 +0000
+++ qt/quick/api/oxideqquickwebcontext_p.h 2014-06-24 11:52:03 +0000
@@ -47,6 +47,8 @@
47 Q_PROPERTY(OxideQQuickWebContextDelegateWorker* networkRequestDelegate READ networkRequestDelegate WRITE setNetworkRequestDelegate NOTIFY networkRequestDelegateChanged)47 Q_PROPERTY(OxideQQuickWebContextDelegateWorker* networkRequestDelegate READ networkRequestDelegate WRITE setNetworkRequestDelegate NOTIFY networkRequestDelegateChanged)
48 Q_PROPERTY(OxideQQuickWebContextDelegateWorker* storageAccessPermissionDelegate READ storageAccessPermissionDelegate WRITE setStorageAccessPermissionDelegate NOTIFY storageAccessPermissionDelegateChanged)48 Q_PROPERTY(OxideQQuickWebContextDelegateWorker* storageAccessPermissionDelegate READ storageAccessPermissionDelegate WRITE setStorageAccessPermissionDelegate NOTIFY storageAccessPermissionDelegateChanged)
49 Q_PROPERTY(OxideQQuickWebContextDelegateWorker* userAgentOverrideDelegate READ userAgentOverrideDelegate WRITE setUserAgentOverrideDelegate NOTIFY userAgentOverrideDelegateChanged)49 Q_PROPERTY(OxideQQuickWebContextDelegateWorker* userAgentOverrideDelegate READ userAgentOverrideDelegate WRITE setUserAgentOverrideDelegate NOTIFY userAgentOverrideDelegateChanged)
50 Q_PROPERTY(bool devtoolsEnabled READ devtoolsEnabled WRITE setDevtoolsEnabled NOTIFY devtoolsEnabledChanged)
51 Q_PROPERTY(int devtoolsPort READ devtoolsPort WRITE setDevtoolsPort NOTIFY devtoolsPortChanged)
5052
51 Q_ENUMS(CookiePolicy)53 Q_ENUMS(CookiePolicy)
52 Q_ENUMS(SessionCookieMode)54 Q_ENUMS(SessionCookieMode)
@@ -115,6 +117,12 @@
115 OxideQQuickWebContextDelegateWorker* userAgentOverrideDelegate() const;117 OxideQQuickWebContextDelegateWorker* userAgentOverrideDelegate() const;
116 void setUserAgentOverrideDelegate(OxideQQuickWebContextDelegateWorker* delegate);118 void setUserAgentOverrideDelegate(OxideQQuickWebContextDelegateWorker* delegate);
117119
120 bool devtoolsEnabled() const;
121 void setDevtoolsEnabled(bool enabled);
122
123 int devtoolsPort() const;
124 void setDevtoolsPort(int port);
125
118 Q_SIGNALS:126 Q_SIGNALS:
119 void productChanged();127 void productChanged();
120 void userAgentChanged();128 void userAgentChanged();
@@ -128,6 +136,8 @@
128 void networkRequestDelegateChanged();136 void networkRequestDelegateChanged();
129 void storageAccessPermissionDelegateChanged();137 void storageAccessPermissionDelegateChanged();
130 void userAgentOverrideDelegateChanged();138 void userAgentOverrideDelegateChanged();
139 void devtoolsEnabledChanged();
140 void devtoolsPortChanged();
131141
132 private:142 private:
133 Q_PRIVATE_SLOT(d_func(), void userScriptUpdated());143 Q_PRIVATE_SLOT(d_func(), void userScriptUpdated());
134144
=== modified file 'shared/browser/oxide_browser_context.h'
--- shared/browser/oxide_browser_context.h 2014-06-19 17:41:21 +0000
+++ shared/browser/oxide_browser_context.h 2014-06-24 11:52:03 +0000
@@ -121,12 +121,20 @@
121 struct Params {121 struct Params {
122 Params(const base::FilePath& path,122 Params(const base::FilePath& path,
123 const base::FilePath& cache_path,123 const base::FilePath& cache_path,
124 const content::CookieStoreConfig::SessionCookieMode session_cookie_mode) :124 const content::CookieStoreConfig::SessionCookieMode session_cookie_mode,
125 path(path), cache_path(cache_path), session_cookie_mode(session_cookie_mode) {}125 bool devtools_enabled,
126 int devtools_port) :
127 path(path),
128 cache_path(cache_path),
129 session_cookie_mode(session_cookie_mode),
130 devtools_enabled(devtools_enabled),
131 devtools_port(devtools_port) {}
126132
127 base::FilePath path;133 base::FilePath path;
128 base::FilePath cache_path;134 base::FilePath cache_path;
129 content::CookieStoreConfig::SessionCookieMode session_cookie_mode;135 content::CookieStoreConfig::SessionCookieMode session_cookie_mode;
136 bool devtools_enabled;
137 int devtools_port;
130 };138 };
131139
132 virtual ~BrowserContext();140 virtual ~BrowserContext();
@@ -180,6 +188,10 @@
180 bool IsPopupBlockerEnabled() const;188 bool IsPopupBlockerEnabled() const;
181 virtual void SetIsPopupBlockerEnabled(bool enabled) = 0;189 virtual void SetIsPopupBlockerEnabled(bool enabled) = 0;
182190
191 virtual bool GetDevtoolsEnabled() const = 0;
192
193 virtual int GetDevtoolsPort() const = 0;
194
183 BrowserContextIOData* io_data() const { return io_data_handle_.io_data(); }195 BrowserContextIOData* io_data() const { return io_data_handle_.io_data(); }
184196
185 virtual UserScriptMaster& UserScriptManager() = 0;197 virtual UserScriptMaster& UserScriptManager() = 0;
186198
=== modified file 'shared/browser/oxide_browser_context_impl.cc'
--- shared/browser/oxide_browser_context_impl.cc 2014-06-02 15:06:30 +0000
+++ shared/browser/oxide_browser_context_impl.cc 2014-06-24 11:52:03 +0000
@@ -20,15 +20,25 @@
20#include "base/logging.h"20#include "base/logging.h"
21#include "base/strings/stringprintf.h"21#include "base/strings/stringprintf.h"
22#include "content/public/browser/browser_thread.h"22#include "content/public/browser/browser_thread.h"
23#include "content/public/browser/devtools_http_handler.h"
23#include "content/public/browser/render_process_host.h"24#include "content/public/browser/render_process_host.h"
24#include "content/public/common/user_agent.h"25#include "content/public/common/user_agent.h"
26#include "net/socket/tcp_listen_socket.h"
2527
26#include "shared/common/chrome_version.h"28#include "shared/common/chrome_version.h"
27#include "shared/common/oxide_content_client.h"29#include "shared/common/oxide_content_client.h"
28#include "shared/common/oxide_messages.h"30#include "shared/common/oxide_messages.h"
2931
32
33#include "oxide_devtools_http_handler_delegate.h"
30#include "oxide_off_the_record_browser_context_impl.h"34#include "oxide_off_the_record_browser_context_impl.h"
3135
36namespace {
37
38const std::string kDevtoolsServerIp = "127.0.0.1";
39
40}
41
32namespace oxide {42namespace oxide {
3343
34BrowserContextIODataImpl::BrowserContextIODataImpl(44BrowserContextIODataImpl::BrowserContextIODataImpl(
@@ -39,7 +49,8 @@
39 accept_langs_("en-us,en"),49 accept_langs_("en-us,en"),
40 cookie_policy_(net::StaticCookiePolicy::ALLOW_ALL_COOKIES),50 cookie_policy_(net::StaticCookiePolicy::ALLOW_ALL_COOKIES),
41 session_cookie_mode_(params.session_cookie_mode),51 session_cookie_mode_(params.session_cookie_mode),
42 popup_blocker_enabled_(true) {}52 popup_blocker_enabled_(true) {
53}
4354
44net::StaticCookiePolicy::Type BrowserContextIODataImpl::GetCookiePolicy() const {55net::StaticCookiePolicy::Type BrowserContextIODataImpl::GetCookiePolicy() const {
45 base::AutoLock lock(lock_);56 base::AutoLock lock(lock_);
@@ -118,6 +129,19 @@
118 default_user_agent_string_(true),129 default_user_agent_string_(true),
119 user_script_manager_(this) {130 user_script_manager_(this) {
120 SetUserAgent(std::string());131 SetUserAgent(std::string());
132
133 if (params.devtools_enabled &&
134 params.devtools_port < 65535 &&
135 params.devtools_port > 1024) {
136 std::string ip = kDevtoolsServerIp;
137 unsigned port = params.devtools_port;
138 devtools_http_handler_ = content::DevToolsHttpHandler::Start(
139 new net::TCPListenSocketFactory(ip, port),
140 std::string(),
141 new DevtoolsHttpHandlerDelegate(
142 ip, port, this),
143 base::FilePath());
144 }
121}145}
122146
123BrowserContextImpl::~BrowserContextImpl() {147BrowserContextImpl::~BrowserContextImpl() {
@@ -126,6 +150,7 @@
126 CHECK(!otr_context_ || otr_context_->HasOneRef()) <<150 CHECK(!otr_context_ || otr_context_->HasOneRef()) <<
127 "Unexpected reference count for OTR BrowserContext. Did you use "151 "Unexpected reference count for OTR BrowserContext. Did you use "
128 "scoped_refptr instead of ScopedBrowserContext?";152 "scoped_refptr instead of ScopedBrowserContext?";
153 devtools_http_handler_->Stop();
129}154}
130155
131BrowserContext* BrowserContextImpl::GetOffTheRecordContext() {156BrowserContext* BrowserContextImpl::GetOffTheRecordContext() {
@@ -189,4 +214,12 @@
189 return user_script_manager_;214 return user_script_manager_;
190}215}
191216
217bool BrowserContextImpl::GetDevtoolsEnabled() const FINAL {
218 return devtools_enabled_;
219}
220
221int BrowserContextImpl::GetDevtoolsPort() const FINAL {
222 return devtools_port_;
223}
224
192} // namespace oxide225} // namespace oxide
193226
=== modified file 'shared/browser/oxide_browser_context_impl.h'
--- shared/browser/oxide_browser_context_impl.h 2014-05-22 08:09:28 +0000
+++ shared/browser/oxide_browser_context_impl.h 2014-06-24 11:52:03 +0000
@@ -27,6 +27,10 @@
27#include "oxide_browser_context.h"27#include "oxide_browser_context.h"
28#include "oxide_user_script_master.h"28#include "oxide_user_script_master.h"
2929
30namespace content {
31class DevToolsHttpHandler;
32}
33
30namespace oxide {34namespace oxide {
3135
32class OffTheRecordBrowserContextImpl;36class OffTheRecordBrowserContextImpl;
@@ -85,6 +89,9 @@
85 void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL;89 void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL;
86 void SetIsPopupBlockerEnabled(bool enabled) FINAL;90 void SetIsPopupBlockerEnabled(bool enabled) FINAL;
8791
92 bool GetDevtoolsEnabled() const FINAL;
93 int GetDevtoolsPort() const FINAL;
94
88 UserScriptMaster& UserScriptManager() FINAL;95 UserScriptMaster& UserScriptManager() FINAL;
8996
90 private:97 private:
@@ -96,6 +103,9 @@
96 std::string product_;103 std::string product_;
97 bool default_user_agent_string_;104 bool default_user_agent_string_;
98 UserScriptMaster user_script_manager_;105 UserScriptMaster user_script_manager_;
106 content::DevToolsHttpHandler* devtools_http_handler_;
107 bool devtools_enabled_;
108 int devtools_port_;
99109
100 DISALLOW_COPY_AND_ASSIGN(BrowserContextImpl);110 DISALLOW_COPY_AND_ASSIGN(BrowserContextImpl);
101};111};
102112
=== added file 'shared/browser/oxide_devtools_http_handler_delegate.cc'
--- shared/browser/oxide_devtools_http_handler_delegate.cc 1970-01-01 00:00:00 +0000
+++ shared/browser/oxide_devtools_http_handler_delegate.cc 2014-06-24 11:52:03 +0000
@@ -0,0 +1,124 @@
1// vim:expandtab:shiftwidth=2:tabstop=2:
2// Copyright (C) 2013 Canonical Ltd.
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
18#include "oxide_devtools_http_handler_delegate.h"
19
20#include "base/logging.h"
21#include "base/path_service.h"
22#include "base/strings/string_number_conversions.h"
23#include "content/public/browser/web_contents.h"
24#include "content/public/browser/devtools_target.h"
25#include "content/public/browser/devtools_http_handler.h"
26#include "content/public/common/url_constants.h"
27#include "net/socket/tcp_listen_socket.h"
28#include "net/url_request/url_request_context_getter.h"
29#include "ui/base/resource/resource_bundle.h"
30
31#include "oxide_devtools_target.h"
32#include "oxide_io_thread.h"
33#include "oxide_web_view.h"
34
35#include "grit/oxide_resources.h"
36
37using content::DevToolsTarget;
38using content::RenderViewHost;
39using content::WebContents;
40
41
42namespace oxide {
43
44DevtoolsHttpHandlerDelegate::DevtoolsHttpHandlerDelegate(
45 const std::string& ip,
46 unsigned port,
47 BrowserContext * attached_browser_context)
48 : ip_(ip),
49 port_(port),
50 browser_context_(attached_browser_context) {
51 LOG(INFO) << "DevTools instance running "
52 << GetLocalDevToolsUrl();
53}
54
55DevtoolsHttpHandlerDelegate::~DevtoolsHttpHandlerDelegate() {
56}
57
58std::string DevtoolsHttpHandlerDelegate::GetDiscoveryPageHTML() {
59 return ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
60 IDR_OXIDE_DEVTOOLS_DISCOVERY_HTML_PAGE).as_string();
61}
62
63std::string
64DevtoolsHttpHandlerDelegate::GetLocalDevToolsUrl() const {
65 std::ostringstream oss;
66 oss << "http://"
67 << ip_
68 << ":"
69 << port_;
70 return oss.str();
71}
72
73bool DevtoolsHttpHandlerDelegate::BundlesFrontendResources() {
74 // We reuse the default chrome builtin webui from devtools_resources.pak
75 return true;
76}
77
78base::FilePath DevtoolsHttpHandlerDelegate::GetDebugFrontendDir() {
79 // We dont host the devtools resources & ui (see above).
80 return base::FilePath();
81}
82
83std::string DevtoolsHttpHandlerDelegate::GetPageThumbnailData(
84 const GURL& url) {
85 return std::string();
86}
87
88scoped_ptr<DevToolsTarget>
89DevtoolsHttpHandlerDelegate::CreateNewTarget(const GURL& url) {
90 // Not supported
91 return scoped_ptr<DevToolsTarget>();
92}
93
94void DevtoolsHttpHandlerDelegate::EnumerateTargets(TargetCallback callback) {
95 TargetList targetList;
96 std::set<WebView*> wvl =
97 WebView::GetAllWebViewsFor(browser_context_);
98 if (!wvl.empty()) {
99 std::set<WebView*>::iterator it = wvl.begin();
100 for (; it != wvl.end(); ++it) {
101 DCHECK(*it) << "Invalid WebView instance (NULL)";
102
103 content::WebContents * web_contents =
104 (*it)->GetWebContents();
105 if (web_contents) {
106 // The receiver of the target list is the owner of the content
107 // See content/public/browser/devtools_http_handler_delegate.h
108 targetList.push_back(
109 DevtoolsTarget::CreateForWebContents(web_contents));
110 }
111 }
112 }
113 callback.Run(targetList);
114}
115
116scoped_ptr<net::StreamListenSocket>
117DevtoolsHttpHandlerDelegate::CreateSocketForTethering(
118 net::StreamListenSocket::Delegate* delegate,
119 std::string* name) {
120 // Not supported
121 return scoped_ptr<net::StreamListenSocket>();
122}
123
124}
0125
=== added file 'shared/browser/oxide_devtools_http_handler_delegate.h'
--- shared/browser/oxide_devtools_http_handler_delegate.h 1970-01-01 00:00:00 +0000
+++ shared/browser/oxide_devtools_http_handler_delegate.h 2014-06-24 11:52:03 +0000
@@ -0,0 +1,71 @@
1// vim:expandtab:shiftwidth=2:tabstop=2:
2// Copyright (C) 2014 Canonical Ltd.
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
18#ifndef _OXIDE_SHARED_BROWSER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_
19#define _OXIDE_SHARED_BROWSER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_
20
21#include <string>
22
23#include "base/basictypes.h"
24#include "base/compiler_specific.h"
25#include "content/public/browser/devtools_http_handler_delegate.h"
26
27namespace content {
28class DevToolsTarget;
29class DevToolsHttpHandler;
30}
31
32namespace oxide {
33
34class BrowserContext;
35
36class DevtoolsHttpHandlerDelegate
37 : public content::DevToolsHttpHandlerDelegate {
38 public:
39
40 DevtoolsHttpHandlerDelegate(
41 const std::string& ip,
42 unsigned port,
43 BrowserContext* attached_browser_context);
44 virtual ~DevtoolsHttpHandlerDelegate();
45
46 // DevToolsHttpProtocolHandler::Delegate overrides.
47 virtual std::string GetDiscoveryPageHTML() OVERRIDE;
48 virtual bool BundlesFrontendResources() OVERRIDE;
49 virtual base::FilePath GetDebugFrontendDir() OVERRIDE;
50 virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE;
51 virtual scoped_ptr<content::DevToolsTarget> CreateNewTarget(
52 const GURL& url) OVERRIDE;
53 virtual void EnumerateTargets(TargetCallback callback) OVERRIDE;
54 virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(
55 net::StreamListenSocket::Delegate* delegate,
56 std::string* name) OVERRIDE;
57
58 private:
59
60 std::string GetLocalDevToolsUrl() const;
61
62 std::string ip_;
63 unsigned port_;
64 BrowserContext* browser_context_;
65 DISALLOW_COPY_AND_ASSIGN(DevtoolsHttpHandlerDelegate);
66};
67
68}
69
70#endif // _OXIDE_SHARED_BROWSER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_
71
072
=== added file 'shared/browser/oxide_devtools_target.cc'
--- shared/browser/oxide_devtools_target.cc 1970-01-01 00:00:00 +0000
+++ shared/browser/oxide_devtools_target.cc 2014-06-24 11:52:03 +0000
@@ -0,0 +1,125 @@
1// vim:expandtab:shiftwidth=2:tabstop=2:
2// Copyright (C) 2014 Canonical Ltd.
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
18#include "oxide_devtools_target.h"
19
20#include "base/logging.h"
21#include "base/strings/utf_string_conversions.h"
22#include "content/public/browser/devtools_agent_host.h"
23#include "content/public/browser/devtools_target.h"
24#include "content/public/browser/devtools_http_handler.h"
25#include "content/public/browser/render_view_host.h"
26#include "content/public/browser/web_contents.h"
27#include "content/public/browser/web_contents_delegate.h"
28#include "content/public/common/url_constants.h"
29
30using content::DevToolsAgentHost;
31using content::DevToolsTarget;
32using content::RenderViewHost;
33using content::WebContents;
34
35namespace oxide {
36
37// static
38DevtoolsTarget* DevtoolsTarget::CreateForWebContents(
39 content::WebContents * web_contents) {
40 DCHECK(web_contents);
41 return new DevtoolsTarget(web_contents);
42}
43
44DevtoolsTarget::DevtoolsTarget(
45 content::WebContents * wc)
46 : content::WebContentsObserver(wc) {
47 DCHECK(wc);
48
49 agent_host_ = DevToolsAgentHost::GetOrCreateFor(web_contents());
50}
51
52DevtoolsTarget::~DevtoolsTarget() {
53}
54
55std::string DevtoolsTarget::GetId() const {
56 return agent_host_ ? agent_host_->GetId() : std::string();
57}
58
59std::string DevtoolsTarget::GetParentId() const {
60 return std::string();
61}
62
63std::string DevtoolsTarget::GetType() const {
64 return std::string();
65}
66
67std::string DevtoolsTarget::GetTitle() const {
68 const content::WebContents* wc = web_contents();
69 if (!wc) {
70 return std::string();
71 }
72
73 return base::UTF16ToUTF8(wc->GetTitle());
74}
75
76std::string DevtoolsTarget::GetDescription() const {
77 return std::string();
78}
79
80GURL DevtoolsTarget::GetURL() const {
81 const content::WebContents* wc = web_contents();
82 if (!wc) {
83 return GURL();
84 }
85
86 return wc->GetVisibleURL();
87}
88
89GURL DevtoolsTarget::GetFaviconURL() const {
90 return GURL();
91}
92
93base::TimeTicks DevtoolsTarget::GetLastActivityTime() const {
94 const content::WebContents* wc = web_contents();
95 if (!wc) {
96 return base::TimeTicks();
97 }
98
99 return wc->GetLastActiveTime();
100}
101
102bool DevtoolsTarget::IsAttached() const {
103 return agent_host_->IsAttached();
104}
105
106scoped_refptr<DevToolsAgentHost> DevtoolsTarget::GetAgentHost() const {
107 return agent_host_;
108}
109
110bool DevtoolsTarget::Activate() const {
111 content::WebContents* wc = web_contents();
112 if (!wc) {
113 return false;
114 }
115
116 wc->GetDelegate()->ActivateContents(wc);
117 return true;
118}
119
120bool DevtoolsTarget::Close() const {
121 NOTIMPLEMENTED();
122 return false;
123}
124
125}
0126
=== added file 'shared/browser/oxide_devtools_target.h'
--- shared/browser/oxide_devtools_target.h 1970-01-01 00:00:00 +0000
+++ shared/browser/oxide_devtools_target.h 2014-06-24 11:52:03 +0000
@@ -0,0 +1,72 @@
1// vim:expandtab:shiftwidth=2:tabstop=2:
2// Copyright (C) 2014 Canonical Ltd.
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
18#ifndef _OXIDE_SHARED_BROWSER_DEVTOOLS_TARGET_H_
19#define _OXIDE_SHARED_BROWSER_DEVTOOLS_TARGET_H_
20
21#include <string>
22
23#include "base/basictypes.h"
24#include "base/compiler_specific.h"
25#include "content/public/browser/devtools_target.h"
26#include "content/public/browser/web_contents_observer.h"
27
28namespace content {
29class DevToolsTarget;
30class DevToolsAgentHost;
31class RenderViewHost;
32class WebContents;
33}
34
35namespace oxide {
36
37class DevtoolsTarget
38 : public content::DevToolsTarget,
39 public content::WebContentsObserver
40{
41 public:
42
43 virtual ~DevtoolsTarget();
44
45 static DevtoolsTarget * CreateForWebContents(content::WebContents *);
46
47 // DevToolsHttpProtocolHandler::Delegate overrides.
48 virtual std::string GetId() const OVERRIDE;
49 virtual std::string GetParentId() const OVERRIDE;
50 virtual std::string GetType() const OVERRIDE;
51 virtual std::string GetTitle() const OVERRIDE;
52 virtual std::string GetDescription() const OVERRIDE;
53 virtual GURL GetURL() const OVERRIDE;
54 virtual GURL GetFaviconURL() const OVERRIDE;
55 virtual base::TimeTicks GetLastActivityTime() const OVERRIDE;
56 virtual bool IsAttached() const OVERRIDE;
57 virtual scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const OVERRIDE;
58 virtual bool Activate() const OVERRIDE;
59 virtual bool Close() const OVERRIDE;
60
61 private:
62 DevtoolsTarget(content::WebContents * web_contents);
63
64 scoped_refptr<content::DevToolsAgentHost> agent_host_;
65
66 DISALLOW_COPY_AND_ASSIGN(DevtoolsTarget);
67};
68
69}
70
71#endif // _OXIDE_SHARED_BROWSER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_
72
073
=== modified file 'shared/browser/oxide_off_the_record_browser_context_impl.cc'
--- shared/browser/oxide_off_the_record_browser_context_impl.cc 2014-05-22 08:09:28 +0000
+++ shared/browser/oxide_off_the_record_browser_context_impl.cc 2014-06-24 11:52:03 +0000
@@ -112,4 +112,13 @@
112 return original_context_->UserScriptManager();112 return original_context_->UserScriptManager();
113}113}
114114
115bool OffTheRecordBrowserContextImpl::GetDevtoolsEnabled() const {
116 return original_context_->GetDevtoolsEnabled();
117}
118
119int OffTheRecordBrowserContextImpl::GetDevtoolsPort() const {
120 return original_context_->GetDevtoolsPort();
121}
122
123
115} // namespace oxide124} // namespace oxide
116125
=== modified file 'shared/browser/oxide_off_the_record_browser_context_impl.h'
--- shared/browser/oxide_off_the_record_browser_context_impl.h 2014-05-22 08:09:28 +0000
+++ shared/browser/oxide_off_the_record_browser_context_impl.h 2014-06-24 11:52:03 +0000
@@ -66,6 +66,9 @@
66 void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL;66 void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL;
67 void SetIsPopupBlockerEnabled(bool enabled) FINAL;67 void SetIsPopupBlockerEnabled(bool enabled) FINAL;
6868
69 bool GetDevtoolsEnabled() const FINAL;
70 int GetDevtoolsPort() const FINAL;
71
69 UserScriptMaster& UserScriptManager() FINAL;72 UserScriptMaster& UserScriptManager() FINAL;
7073
71 private:74 private:
7275
=== modified file 'shared/browser/oxide_web_view.cc'
--- shared/browser/oxide_web_view.cc 2014-06-19 17:41:21 +0000
+++ shared/browser/oxide_web_view.cc 2014-06-24 11:52:03 +0000
@@ -19,6 +19,7 @@
1919
20#include <queue>20#include <queue>
2121
22#include "base/lazy_instance.h"
22#include "base/logging.h"23#include "base/logging.h"
23#include "base/strings/utf_string_conversions.h"24#include "base/strings/utf_string_conversions.h"
24#include "base/supports_user_data.h"25#include "base/supports_user_data.h"
@@ -113,6 +114,27 @@
113 view->Init(&params);114 view->Init(&params);
114}115}
115116
117typedef std::map<BrowserContext*, std::set<WebView*> > WebViewsPerContextMap;
118base::LazyInstance<WebViewsPerContextMap> g_web_view_per_context;
119
120}
121
122// static
123std::set<WebView*>
124WebView::GetAllWebViewsFor(BrowserContext * browser_context) {
125 std::set<WebView*> webviews;
126 if (!browser_context) {
127 return webviews;
128 }
129 WebViewsPerContextMap::iterator it;
130 for (it = g_web_view_per_context.Get().begin();
131 it != g_web_view_per_context.Get().end();
132 ++it) {
133 if (browser_context->IsSameContext(it->first)) {
134 return it->second;
135 }
136 }
137 return webviews;
116}138}
117139
118void WebView::DispatchLoadFailed(const GURL& validated_url,140void WebView::DispatchLoadFailed(const GURL& validated_url,
@@ -559,9 +581,25 @@
559 : web_contents_helper_(NULL),581 : web_contents_helper_(NULL),
560 initial_preferences_(NULL),582 initial_preferences_(NULL),
561 root_frame_(NULL),583 root_frame_(NULL),
562 is_fullscreen_(false) {}584 is_fullscreen_(false) {
585}
563586
564WebView::~WebView() {587WebView::~WebView() {
588 BrowserContext* context =
589 GetBrowserContext();
590 WebViewsPerContextMap::iterator it =
591 g_web_view_per_context.Get().find(context);
592 if (it != g_web_view_per_context.Get().end()) {
593 std::set<WebView*>& wvl = it->second;
594 if (wvl.find(this) != wvl.end()) {
595 wvl.erase(this);
596 g_web_view_per_context.Get()[context] = wvl;
597 }
598 if (g_web_view_per_context.Get()[context].empty()) {
599 g_web_view_per_context.Get().erase(context);
600 }
601 }
602
565 if (root_frame_) {603 if (root_frame_) {
566 root_frame_->Destroy();604 root_frame_->Destroy();
567 }605 }
@@ -632,7 +670,22 @@
632 SetURL(initial_url_);670 SetURL(initial_url_);
633 initial_url_ = GURL();671 initial_url_ = GURL();
634 }672 }
673
635 SetIsFullscreen(is_fullscreen_);674 SetIsFullscreen(is_fullscreen_);
675
676 {
677 BrowserContext* context =
678 GetBrowserContext()->GetOriginalContext();
679 WebViewsPerContextMap::iterator it =
680 g_web_view_per_context.Get().find(context);
681 if (it != g_web_view_per_context.Get().end()) {
682 g_web_view_per_context.Get()[context].insert(this);
683 } else {
684 std::set<WebView*> wvl;
685 wvl.insert(this);
686 g_web_view_per_context.Get()[context] = wvl;
687 }
688 }
636}689}
637690
638// static691// static
639692
=== modified file 'shared/browser/oxide_web_view.h'
--- shared/browser/oxide_web_view.h 2014-06-19 17:41:21 +0000
+++ shared/browser/oxide_web_view.h 2014-06-24 11:52:03 +0000
@@ -20,6 +20,7 @@
2020
21#include <string>21#include <string>
22#include <vector>22#include <vector>
23#include <set>
2324
24#include "base/basictypes.h"25#include "base/basictypes.h"
25#include "base/compiler_specific.h"26#include "base/compiler_specific.h"
@@ -94,6 +95,9 @@
94 static WebView* FromWebContents(const content::WebContents* web_contents);95 static WebView* FromWebContents(const content::WebContents* web_contents);
95 static WebView* FromRenderViewHost(content::RenderViewHost* rvh);96 static WebView* FromRenderViewHost(content::RenderViewHost* rvh);
9697
98 static std::set<WebView*> GetAllWebViewsFor(
99 BrowserContext * browser_context);
100
97 const GURL& GetURL() const;101 const GURL& GetURL() const;
98 void SetURL(const GURL& url);102 void SetURL(const GURL& url);
99103
100104
=== added directory 'shared/browser/resources'
=== added file 'shared/browser/resources/devtools_discovery_page.html'
--- shared/browser/resources/devtools_discovery_page.html 1970-01-01 00:00:00 +0000
+++ shared/browser/resources/devtools_discovery_page.html 2014-06-24 11:52:03 +0000
@@ -0,0 +1,155 @@
1<html>
2<head>
3<title>Inspectable pages</title>
4<style>
5body {
6 background-color: rgb(245, 245, 245);
7 font-family: Helvetica, Arial, sans-serif;
8 text-shadow: rgba(255, 255, 255, 0.496094) 0px 1px 0px;
9}
10
11#caption {
12 color: black;
13 font-size: 16px;
14 margin-top: 30px;
15 margin-bottom: 0px;
16 margin-left: 70px;
17 height: 20px;
18 text-align: left;
19}
20
21#items {
22 display: -webkit-box;
23 margin-left: 60px;
24 margin-right: 60px;
25 -webkit-box-orient: horizontal;
26 -webkit-box-lines: multiple;
27}
28
29.frontend_ref {
30 color: black;
31 text-decoration: initial;
32}
33
34.thumbnail {
35 background-attachment: scroll;
36 background-origin: padding-box;
37 background-repeat: no-repeat;
38 border: 4px solid rgba(184, 184, 184, 1);
39 border-radius: 5px;
40 height: 132px;
41 width: 212px;
42 -webkit-transition-property: background-color, border-color;
43 -webkit-transition: background-color 0.15s, 0.15s;
44 -webkit-transition-delay: 0, 0;
45}
46
47.thumbnail:hover {
48 background-color: rgba(242, 242, 242, 1);
49 border-color: rgba(110, 116, 128, 1);
50 color: black;
51}
52
53.thumbnail.connected {
54 opacity: 0.5;
55}
56
57.thumbnail.connected:hover {
58 border-color: rgba(184, 184, 184, 1);
59 color: rgb(110, 116, 128);
60}
61
62.item {
63 display: inline-block;
64 margin: 5px;
65 margin-top: 15px;
66 height: 162px;
67 vertical-align: top;
68 width: 222px;
69}
70
71.text {
72 background: no-repeat 0;
73 background-size: 16px;
74 font-size: 12px;
75 margin: 4px 0px 0px 4px;
76 overflow: hidden;
77 padding: 2px 0px 0px 20px;
78 text-align: left;
79 text-overflow: ellipsis;
80 white-space: nowrap;
81}
82</style>
83
84<script>
85
86function onLoad() {
87 var tabsListRequest = new XMLHttpRequest();
88 tabsListRequest.open('GET', '/json/list', true);
89 tabsListRequest.onreadystatechange = onReady;
90 tabsListRequest.send();
91}
92
93function onReady() {
94 if(this.readyState == 4 && this.status == 200) {
95 if(this.response != null)
96 var responseJSON = JSON.parse(this.response);
97 for (var i = 0; i < responseJSON.length; ++i)
98 appendItem(responseJSON[i]);
99 }
100}
101
102function overrideFrontendUrl(item) {
103 if (window.location.hash) {
104 var overridden_url = window.location.hash.substr(1);
105 var ws_suffix = item.webSocketDebuggerUrl.replace('ws://', 'ws=');
106 if (overridden_url.indexOf('?') == -1)
107 return overridden_url + '?' + ws_suffix;
108 else
109 return overridden_url + '&' + ws_suffix;
110 }
111 return item.devtoolsFrontendUrl;
112}
113
114function appendItem(item_object) {
115 var frontend_ref;
116 if (item_object.devtoolsFrontendUrl) {
117 frontend_ref = document.createElement('a');
118 frontend_ref.href = overrideFrontendUrl(item_object);
119 frontend_ref.title = item_object.title;
120 } else {
121 frontend_ref = document.createElement('div');
122 frontend_ref.title = 'The tab already has an active debug session';
123 }
124 frontend_ref.className = 'frontend_ref';
125
126 var thumbnail = document.createElement('div');
127 thumbnail.className = item_object.devtoolsFrontendUrl ?
128 'thumbnail' : 'thumbnail connected';
129 thumbnail.style.cssText = 'background-image:url(' +
130 item_object.thumbnailUrl +
131 ')';
132 frontend_ref.appendChild(thumbnail);
133
134 var text = document.createElement('div');
135 text.className = 'text';
136 text.innerText = item_object.description || item_object.title;
137 text.style.cssText = 'background-image:url(' +
138 item_object.faviconUrl + ')';
139 frontend_ref.appendChild(text);
140
141 var item = document.createElement('p');
142 item.className = 'item';
143 item.appendChild(frontend_ref);
144
145 document.getElementById('items').appendChild(item);
146}
147</script>
148</head>
149<body onload='onLoad()'>
150 <div id='caption'>Inspectable pages</div>
151 <div id='items'>
152 </div>
153 <hr>
154</body>
155</html>
0156
=== modified file 'shared/oxide_resources.grd'
--- shared/oxide_resources.grd 2014-02-28 12:53:41 +0000
+++ shared/oxide_resources.grd 2014-06-24 11:52:03 +0000
@@ -9,6 +9,7 @@
9 <release seq="1">9 <release seq="1">
10 <includes>10 <includes>
11 <include name="IDR_OXIDE_SCRIPT_MESSAGE_MANAGER_BINDINGS_JS" file="renderer/oxide_script_message_manager_bindings.js" type="BINDATA" />11 <include name="IDR_OXIDE_SCRIPT_MESSAGE_MANAGER_BINDINGS_JS" file="renderer/oxide_script_message_manager_bindings.js" type="BINDATA" />
12 <include name="IDR_OXIDE_DEVTOOLS_DISCOVERY_HTML_PAGE" file="browser/resources/devtools_discovery_page.html" type="BINDATA" />
12 </includes>13 </includes>
13 </release>14 </release>
14</grit>15</grit>
1516
=== modified file 'shared/shared.gyp'
--- shared/shared.gyp 2014-06-19 17:41:21 +0000
+++ shared/shared.gyp 2014-06-24 11:52:03 +0000
@@ -42,6 +42,7 @@
42 'dependencies': [42 'dependencies': [
43 'oxide_extra_resources',43 'oxide_extra_resources',
44 '<(DEPTH)/content/content_resources.gyp:content_resources',44 '<(DEPTH)/content/content_resources.gyp:content_resources',
45 '<(DEPTH)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
45 '<(DEPTH)/net/net.gyp:net_resources',46 '<(DEPTH)/net/net.gyp:net_resources',
46 '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',47 '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
47 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',48 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
@@ -53,6 +54,7 @@
53 'variables': {54 'variables': {
54 'pak_inputs': [55 'pak_inputs': [
55 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',56 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
57 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
56 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',58 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
57 '<(SHARED_INTERMEDIATE_DIR)/oxide/oxide_resources.pak',59 '<(SHARED_INTERMEDIATE_DIR)/oxide/oxide_resources.pak',
58 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',60 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',
@@ -226,6 +228,10 @@
226 'browser/oxide_content_browser_client.cc',228 'browser/oxide_content_browser_client.cc',
227 'browser/oxide_content_browser_client.h',229 'browser/oxide_content_browser_client.h',
228 'browser/oxide_default_screen_info.h',230 'browser/oxide_default_screen_info.h',
231 'browser/oxide_devtools_http_handler_delegate.cc',
232 'browser/oxide_devtools_http_handler_delegate.h',
233 'browser/oxide_devtools_target.cc',
234 'browser/oxide_devtools_target.h',
229 'browser/oxide_file_picker.cc',235 'browser/oxide_file_picker.cc',
230 'browser/oxide_file_picker.h',236 'browser/oxide_file_picker.h',
231 'browser/oxide_form_factor.h',237 'browser/oxide_form_factor.h',

Subscribers

People subscribed via source and target branches