Merge lp:~abreu-alexandre/oxide/add-devtools-support into lp:~oxide-developers/oxide/oxide.trunk
- add-devtools-support
- Merge into 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 | ||||
Related bugs: |
|
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
- 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
1 | === modified file 'qt/core/api/oxideqwebpreferences.h' | |||
2 | --- qt/core/api/oxideqwebpreferences.h 2014-05-26 22:12:33 +0000 | |||
3 | +++ qt/core/api/oxideqwebpreferences.h 2014-06-24 11:52:03 +0000 | |||
4 | @@ -139,6 +139,7 @@ | |||
5 | 139 | void setTouchEnabled(bool enabled); | 139 | void setTouchEnabled(bool enabled); |
6 | 140 | 140 | ||
7 | 141 | Q_SIGNALS: | 141 | Q_SIGNALS: |
8 | 142 | |||
9 | 142 | void standardFontFamilyChanged(); | 143 | void standardFontFamilyChanged(); |
10 | 143 | void fixedFontFamilyChanged(); | 144 | void fixedFontFamilyChanged(); |
11 | 144 | void serifFontFamilyChanged(); | 145 | void serifFontFamilyChanged(); |
12 | 145 | 146 | ||
13 | === modified file 'qt/core/glue/oxide_qt_web_context_adapter.cc' | |||
14 | --- qt/core/glue/oxide_qt_web_context_adapter.cc 2014-06-02 21:56:59 +0000 | |||
15 | +++ qt/core/glue/oxide_qt_web_context_adapter.cc 2014-06-24 11:52:03 +0000 | |||
16 | @@ -81,6 +81,37 @@ | |||
17 | 81 | } | 81 | } |
18 | 82 | } | 82 | } |
19 | 83 | 83 | ||
20 | 84 | bool WebContextAdapter::devtoolsEnabled() const { | ||
21 | 85 | if (isInitialized()) { | ||
22 | 86 | return priv->context_->GetDevtoolsEnabled(); | ||
23 | 87 | } | ||
24 | 88 | return priv->construct_props_->devtools_enabled; | ||
25 | 89 | } | ||
26 | 90 | |||
27 | 91 | void WebContextAdapter::setDevtoolsEnabled(bool enabled) { | ||
28 | 92 | if (isInitialized()) { | ||
29 | 93 | qWarning() << "Cannot change the devtools enabled after inititialization"; | ||
30 | 94 | return; | ||
31 | 95 | } | ||
32 | 96 | priv->construct_props_->devtools_enabled = enabled; | ||
33 | 97 | } | ||
34 | 98 | |||
35 | 99 | int WebContextAdapter::devtoolsPort() const { | ||
36 | 100 | if (isInitialized()) { | ||
37 | 101 | return priv->context_->GetDevtoolsPort(); | ||
38 | 102 | } | ||
39 | 103 | |||
40 | 104 | return priv->construct_props_->devtools_port; | ||
41 | 105 | } | ||
42 | 106 | |||
43 | 107 | void WebContextAdapter::setDevtoolsPort(int port) { | ||
44 | 108 | if (isInitialized()) { | ||
45 | 109 | qWarning() << "Cannot change the devtools port after inititialization"; | ||
46 | 110 | return; | ||
47 | 111 | } | ||
48 | 112 | priv->construct_props_->devtools_port = port; | ||
49 | 113 | } | ||
50 | 114 | |||
51 | 84 | QUrl WebContextAdapter::dataPath() const { | 115 | QUrl WebContextAdapter::dataPath() const { |
52 | 85 | base::FilePath path; | 116 | base::FilePath path; |
53 | 86 | if (isInitialized()) { | 117 | if (isInitialized()) { |
54 | 87 | 118 | ||
55 | === modified file 'qt/core/glue/oxide_qt_web_context_adapter.h' | |||
56 | --- qt/core/glue/oxide_qt_web_context_adapter.h 2014-04-02 19:57:47 +0000 | |||
57 | +++ qt/core/glue/oxide_qt_web_context_adapter.h 2014-06-24 11:52:03 +0000 | |||
58 | @@ -105,6 +105,12 @@ | |||
59 | 105 | bool popupBlockerEnabled() const; | 105 | bool popupBlockerEnabled() const; |
60 | 106 | void setPopupBlockerEnabled(bool enabled); | 106 | void setPopupBlockerEnabled(bool enabled); |
61 | 107 | 107 | ||
62 | 108 | bool devtoolsEnabled() const; | ||
63 | 109 | void setDevtoolsEnabled(bool enabled); | ||
64 | 110 | |||
65 | 111 | int devtoolsPort() const; | ||
66 | 112 | void setDevtoolsPort(int port); | ||
67 | 113 | |||
68 | 108 | protected: | 114 | protected: |
69 | 109 | WebContextAdapter(QObject* q, | 115 | WebContextAdapter(QObject* q, |
70 | 110 | IOThreadDelegate* io_delegate, | 116 | IOThreadDelegate* io_delegate, |
71 | 111 | 117 | ||
72 | === modified file 'qt/core/glue/oxide_qt_web_context_adapter_p.h' | |||
73 | --- qt/core/glue/oxide_qt_web_context_adapter_p.h 2014-04-02 19:57:47 +0000 | |||
74 | +++ qt/core/glue/oxide_qt_web_context_adapter_p.h 2014-06-24 11:52:03 +0000 | |||
75 | @@ -69,6 +69,8 @@ | |||
76 | 69 | net::StaticCookiePolicy::Type cookie_policy; | 69 | net::StaticCookiePolicy::Type cookie_policy; |
77 | 70 | content::CookieStoreConfig::SessionCookieMode session_cookie_mode; | 70 | content::CookieStoreConfig::SessionCookieMode session_cookie_mode; |
78 | 71 | bool popup_blocker_enabled; | 71 | bool popup_blocker_enabled; |
79 | 72 | bool devtools_enabled; | ||
80 | 73 | int devtools_port; | ||
81 | 72 | }; | 74 | }; |
82 | 73 | 75 | ||
83 | 74 | static WebContextAdapterPrivate* Create( | 76 | static WebContextAdapterPrivate* Create( |
84 | 75 | 77 | ||
85 | === modified file 'qt/core/glue/private/oxide_qt_web_context_adapter_p.cc' | |||
86 | --- qt/core/glue/private/oxide_qt_web_context_adapter_p.cc 2014-04-02 19:57:47 +0000 | |||
87 | +++ qt/core/glue/private/oxide_qt_web_context_adapter_p.cc 2014-06-24 11:52:03 +0000 | |||
88 | @@ -38,13 +38,19 @@ | |||
89 | 38 | #include "../oxide_qt_user_script_adapter.h" | 38 | #include "../oxide_qt_user_script_adapter.h" |
90 | 39 | #include "../oxide_qt_user_script_adapter_p.h" | 39 | #include "../oxide_qt_user_script_adapter_p.h" |
91 | 40 | 40 | ||
92 | 41 | namespace { | ||
93 | 42 | const unsigned kDefaultDevtoolsPort = 8484; | ||
94 | 43 | } | ||
95 | 44 | |||
96 | 41 | namespace oxide { | 45 | namespace oxide { |
97 | 42 | namespace qt { | 46 | namespace qt { |
98 | 43 | 47 | ||
99 | 44 | WebContextAdapterPrivate::ConstructProperties::ConstructProperties() : | 48 | WebContextAdapterPrivate::ConstructProperties::ConstructProperties() : |
100 | 45 | cookie_policy(net::StaticCookiePolicy::ALLOW_ALL_COOKIES), | 49 | cookie_policy(net::StaticCookiePolicy::ALLOW_ALL_COOKIES), |
101 | 46 | session_cookie_mode(content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES), | 50 | session_cookie_mode(content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES), |
103 | 47 | popup_blocker_enabled(true) {} | 51 | popup_blocker_enabled(true), |
104 | 52 | devtools_enabled(false), | ||
105 | 53 | devtools_port(kDefaultDevtoolsPort) {} | ||
106 | 48 | 54 | ||
107 | 49 | // static | 55 | // static |
108 | 50 | WebContextAdapterPrivate* WebContextAdapterPrivate::Create( | 56 | WebContextAdapterPrivate* WebContextAdapterPrivate::Create( |
109 | @@ -204,7 +210,9 @@ | |||
110 | 204 | oxide::BrowserContext::Params params( | 210 | oxide::BrowserContext::Params params( |
111 | 205 | construct_props_->data_path, | 211 | construct_props_->data_path, |
112 | 206 | construct_props_->cache_path, | 212 | construct_props_->cache_path, |
114 | 207 | construct_props_->session_cookie_mode); | 213 | construct_props_->session_cookie_mode, |
115 | 214 | construct_props_->devtools_enabled, | ||
116 | 215 | construct_props_->devtools_port); | ||
117 | 208 | context_ = oxide::BrowserContext::Create(params); | 216 | context_ = oxide::BrowserContext::Create(params); |
118 | 209 | 217 | ||
119 | 210 | if (!construct_props_->product.empty()) { | 218 | if (!construct_props_->product.empty()) { |
120 | 211 | 219 | ||
121 | === modified file 'qt/quick/api/oxideqquickwebcontext.cc' | |||
122 | --- qt/quick/api/oxideqquickwebcontext.cc 2014-06-05 09:51:42 +0000 | |||
123 | +++ qt/quick/api/oxideqquickwebcontext.cc 2014-06-24 11:52:03 +0000 | |||
124 | @@ -680,4 +680,40 @@ | |||
125 | 680 | } | 680 | } |
126 | 681 | } | 681 | } |
127 | 682 | 682 | ||
128 | 683 | bool OxideQQuickWebContext::devtoolsEnabled() const { | ||
129 | 684 | Q_D(const OxideQQuickWebContext); | ||
130 | 685 | |||
131 | 686 | return d->devtoolsEnabled(); | ||
132 | 687 | } | ||
133 | 688 | |||
134 | 689 | void OxideQQuickWebContext::setDevtoolsEnabled(bool enabled) { | ||
135 | 690 | Q_D(OxideQQuickWebContext); | ||
136 | 691 | |||
137 | 692 | if (d->devtoolsEnabled() == enabled) { | ||
138 | 693 | return; | ||
139 | 694 | } | ||
140 | 695 | |||
141 | 696 | d->setDevtoolsEnabled(enabled); | ||
142 | 697 | |||
143 | 698 | emit devtoolsEnabledChanged(); | ||
144 | 699 | } | ||
145 | 700 | |||
146 | 701 | int OxideQQuickWebContext::devtoolsPort() const { | ||
147 | 702 | Q_D(const OxideQQuickWebContext); | ||
148 | 703 | |||
149 | 704 | return d->devtoolsPort(); | ||
150 | 705 | } | ||
151 | 706 | |||
152 | 707 | void OxideQQuickWebContext::setDevtoolsPort(int port) { | ||
153 | 708 | Q_D(OxideQQuickWebContext); | ||
154 | 709 | |||
155 | 710 | if (d->devtoolsPort() == port) { | ||
156 | 711 | return; | ||
157 | 712 | } | ||
158 | 713 | |||
159 | 714 | d->setDevtoolsPort(port); | ||
160 | 715 | |||
161 | 716 | emit devtoolsPortChanged(); | ||
162 | 717 | } | ||
163 | 718 | |||
164 | 683 | #include "moc_oxideqquickwebcontext_p.cpp" | 719 | #include "moc_oxideqquickwebcontext_p.cpp" |
165 | 684 | 720 | ||
166 | === modified file 'qt/quick/api/oxideqquickwebcontext_p.h' | |||
167 | --- qt/quick/api/oxideqquickwebcontext_p.h 2014-04-02 22:32:27 +0000 | |||
168 | +++ qt/quick/api/oxideqquickwebcontext_p.h 2014-06-24 11:52:03 +0000 | |||
169 | @@ -47,6 +47,8 @@ | |||
170 | 47 | Q_PROPERTY(OxideQQuickWebContextDelegateWorker* networkRequestDelegate READ networkRequestDelegate WRITE setNetworkRequestDelegate NOTIFY networkRequestDelegateChanged) | 47 | Q_PROPERTY(OxideQQuickWebContextDelegateWorker* networkRequestDelegate READ networkRequestDelegate WRITE setNetworkRequestDelegate NOTIFY networkRequestDelegateChanged) |
171 | 48 | Q_PROPERTY(OxideQQuickWebContextDelegateWorker* storageAccessPermissionDelegate READ storageAccessPermissionDelegate WRITE setStorageAccessPermissionDelegate NOTIFY storageAccessPermissionDelegateChanged) | 48 | Q_PROPERTY(OxideQQuickWebContextDelegateWorker* storageAccessPermissionDelegate READ storageAccessPermissionDelegate WRITE setStorageAccessPermissionDelegate NOTIFY storageAccessPermissionDelegateChanged) |
172 | 49 | Q_PROPERTY(OxideQQuickWebContextDelegateWorker* userAgentOverrideDelegate READ userAgentOverrideDelegate WRITE setUserAgentOverrideDelegate NOTIFY userAgentOverrideDelegateChanged) | 49 | Q_PROPERTY(OxideQQuickWebContextDelegateWorker* userAgentOverrideDelegate READ userAgentOverrideDelegate WRITE setUserAgentOverrideDelegate NOTIFY userAgentOverrideDelegateChanged) |
173 | 50 | Q_PROPERTY(bool devtoolsEnabled READ devtoolsEnabled WRITE setDevtoolsEnabled NOTIFY devtoolsEnabledChanged) | ||
174 | 51 | Q_PROPERTY(int devtoolsPort READ devtoolsPort WRITE setDevtoolsPort NOTIFY devtoolsPortChanged) | ||
175 | 50 | 52 | ||
176 | 51 | Q_ENUMS(CookiePolicy) | 53 | Q_ENUMS(CookiePolicy) |
177 | 52 | Q_ENUMS(SessionCookieMode) | 54 | Q_ENUMS(SessionCookieMode) |
178 | @@ -115,6 +117,12 @@ | |||
179 | 115 | OxideQQuickWebContextDelegateWorker* userAgentOverrideDelegate() const; | 117 | OxideQQuickWebContextDelegateWorker* userAgentOverrideDelegate() const; |
180 | 116 | void setUserAgentOverrideDelegate(OxideQQuickWebContextDelegateWorker* delegate); | 118 | void setUserAgentOverrideDelegate(OxideQQuickWebContextDelegateWorker* delegate); |
181 | 117 | 119 | ||
182 | 120 | bool devtoolsEnabled() const; | ||
183 | 121 | void setDevtoolsEnabled(bool enabled); | ||
184 | 122 | |||
185 | 123 | int devtoolsPort() const; | ||
186 | 124 | void setDevtoolsPort(int port); | ||
187 | 125 | |||
188 | 118 | Q_SIGNALS: | 126 | Q_SIGNALS: |
189 | 119 | void productChanged(); | 127 | void productChanged(); |
190 | 120 | void userAgentChanged(); | 128 | void userAgentChanged(); |
191 | @@ -128,6 +136,8 @@ | |||
192 | 128 | void networkRequestDelegateChanged(); | 136 | void networkRequestDelegateChanged(); |
193 | 129 | void storageAccessPermissionDelegateChanged(); | 137 | void storageAccessPermissionDelegateChanged(); |
194 | 130 | void userAgentOverrideDelegateChanged(); | 138 | void userAgentOverrideDelegateChanged(); |
195 | 139 | void devtoolsEnabledChanged(); | ||
196 | 140 | void devtoolsPortChanged(); | ||
197 | 131 | 141 | ||
198 | 132 | private: | 142 | private: |
199 | 133 | Q_PRIVATE_SLOT(d_func(), void userScriptUpdated()); | 143 | Q_PRIVATE_SLOT(d_func(), void userScriptUpdated()); |
200 | 134 | 144 | ||
201 | === modified file 'shared/browser/oxide_browser_context.h' | |||
202 | --- shared/browser/oxide_browser_context.h 2014-06-19 17:41:21 +0000 | |||
203 | +++ shared/browser/oxide_browser_context.h 2014-06-24 11:52:03 +0000 | |||
204 | @@ -121,12 +121,20 @@ | |||
205 | 121 | struct Params { | 121 | struct Params { |
206 | 122 | Params(const base::FilePath& path, | 122 | Params(const base::FilePath& path, |
207 | 123 | const base::FilePath& cache_path, | 123 | const base::FilePath& cache_path, |
210 | 124 | const content::CookieStoreConfig::SessionCookieMode session_cookie_mode) : | 124 | const content::CookieStoreConfig::SessionCookieMode session_cookie_mode, |
211 | 125 | path(path), cache_path(cache_path), session_cookie_mode(session_cookie_mode) {} | 125 | bool devtools_enabled, |
212 | 126 | int devtools_port) : | ||
213 | 127 | path(path), | ||
214 | 128 | cache_path(cache_path), | ||
215 | 129 | session_cookie_mode(session_cookie_mode), | ||
216 | 130 | devtools_enabled(devtools_enabled), | ||
217 | 131 | devtools_port(devtools_port) {} | ||
218 | 126 | 132 | ||
219 | 127 | base::FilePath path; | 133 | base::FilePath path; |
220 | 128 | base::FilePath cache_path; | 134 | base::FilePath cache_path; |
221 | 129 | content::CookieStoreConfig::SessionCookieMode session_cookie_mode; | 135 | content::CookieStoreConfig::SessionCookieMode session_cookie_mode; |
222 | 136 | bool devtools_enabled; | ||
223 | 137 | int devtools_port; | ||
224 | 130 | }; | 138 | }; |
225 | 131 | 139 | ||
226 | 132 | virtual ~BrowserContext(); | 140 | virtual ~BrowserContext(); |
227 | @@ -180,6 +188,10 @@ | |||
228 | 180 | bool IsPopupBlockerEnabled() const; | 188 | bool IsPopupBlockerEnabled() const; |
229 | 181 | virtual void SetIsPopupBlockerEnabled(bool enabled) = 0; | 189 | virtual void SetIsPopupBlockerEnabled(bool enabled) = 0; |
230 | 182 | 190 | ||
231 | 191 | virtual bool GetDevtoolsEnabled() const = 0; | ||
232 | 192 | |||
233 | 193 | virtual int GetDevtoolsPort() const = 0; | ||
234 | 194 | |||
235 | 183 | BrowserContextIOData* io_data() const { return io_data_handle_.io_data(); } | 195 | BrowserContextIOData* io_data() const { return io_data_handle_.io_data(); } |
236 | 184 | 196 | ||
237 | 185 | virtual UserScriptMaster& UserScriptManager() = 0; | 197 | virtual UserScriptMaster& UserScriptManager() = 0; |
238 | 186 | 198 | ||
239 | === modified file 'shared/browser/oxide_browser_context_impl.cc' | |||
240 | --- shared/browser/oxide_browser_context_impl.cc 2014-06-02 15:06:30 +0000 | |||
241 | +++ shared/browser/oxide_browser_context_impl.cc 2014-06-24 11:52:03 +0000 | |||
242 | @@ -20,15 +20,25 @@ | |||
243 | 20 | #include "base/logging.h" | 20 | #include "base/logging.h" |
244 | 21 | #include "base/strings/stringprintf.h" | 21 | #include "base/strings/stringprintf.h" |
245 | 22 | #include "content/public/browser/browser_thread.h" | 22 | #include "content/public/browser/browser_thread.h" |
246 | 23 | #include "content/public/browser/devtools_http_handler.h" | ||
247 | 23 | #include "content/public/browser/render_process_host.h" | 24 | #include "content/public/browser/render_process_host.h" |
248 | 24 | #include "content/public/common/user_agent.h" | 25 | #include "content/public/common/user_agent.h" |
249 | 26 | #include "net/socket/tcp_listen_socket.h" | ||
250 | 25 | 27 | ||
251 | 26 | #include "shared/common/chrome_version.h" | 28 | #include "shared/common/chrome_version.h" |
252 | 27 | #include "shared/common/oxide_content_client.h" | 29 | #include "shared/common/oxide_content_client.h" |
253 | 28 | #include "shared/common/oxide_messages.h" | 30 | #include "shared/common/oxide_messages.h" |
254 | 29 | 31 | ||
255 | 32 | |||
256 | 33 | #include "oxide_devtools_http_handler_delegate.h" | ||
257 | 30 | #include "oxide_off_the_record_browser_context_impl.h" | 34 | #include "oxide_off_the_record_browser_context_impl.h" |
258 | 31 | 35 | ||
259 | 36 | namespace { | ||
260 | 37 | |||
261 | 38 | const std::string kDevtoolsServerIp = "127.0.0.1"; | ||
262 | 39 | |||
263 | 40 | } | ||
264 | 41 | |||
265 | 32 | namespace oxide { | 42 | namespace oxide { |
266 | 33 | 43 | ||
267 | 34 | BrowserContextIODataImpl::BrowserContextIODataImpl( | 44 | BrowserContextIODataImpl::BrowserContextIODataImpl( |
268 | @@ -39,7 +49,8 @@ | |||
269 | 39 | accept_langs_("en-us,en"), | 49 | accept_langs_("en-us,en"), |
270 | 40 | cookie_policy_(net::StaticCookiePolicy::ALLOW_ALL_COOKIES), | 50 | cookie_policy_(net::StaticCookiePolicy::ALLOW_ALL_COOKIES), |
271 | 41 | session_cookie_mode_(params.session_cookie_mode), | 51 | session_cookie_mode_(params.session_cookie_mode), |
273 | 42 | popup_blocker_enabled_(true) {} | 52 | popup_blocker_enabled_(true) { |
274 | 53 | } | ||
275 | 43 | 54 | ||
276 | 44 | net::StaticCookiePolicy::Type BrowserContextIODataImpl::GetCookiePolicy() const { | 55 | net::StaticCookiePolicy::Type BrowserContextIODataImpl::GetCookiePolicy() const { |
277 | 45 | base::AutoLock lock(lock_); | 56 | base::AutoLock lock(lock_); |
278 | @@ -118,6 +129,19 @@ | |||
279 | 118 | default_user_agent_string_(true), | 129 | default_user_agent_string_(true), |
280 | 119 | user_script_manager_(this) { | 130 | user_script_manager_(this) { |
281 | 120 | SetUserAgent(std::string()); | 131 | SetUserAgent(std::string()); |
282 | 132 | |||
283 | 133 | if (params.devtools_enabled && | ||
284 | 134 | params.devtools_port < 65535 && | ||
285 | 135 | params.devtools_port > 1024) { | ||
286 | 136 | std::string ip = kDevtoolsServerIp; | ||
287 | 137 | unsigned port = params.devtools_port; | ||
288 | 138 | devtools_http_handler_ = content::DevToolsHttpHandler::Start( | ||
289 | 139 | new net::TCPListenSocketFactory(ip, port), | ||
290 | 140 | std::string(), | ||
291 | 141 | new DevtoolsHttpHandlerDelegate( | ||
292 | 142 | ip, port, this), | ||
293 | 143 | base::FilePath()); | ||
294 | 144 | } | ||
295 | 121 | } | 145 | } |
296 | 122 | 146 | ||
297 | 123 | BrowserContextImpl::~BrowserContextImpl() { | 147 | BrowserContextImpl::~BrowserContextImpl() { |
298 | @@ -126,6 +150,7 @@ | |||
299 | 126 | CHECK(!otr_context_ || otr_context_->HasOneRef()) << | 150 | CHECK(!otr_context_ || otr_context_->HasOneRef()) << |
300 | 127 | "Unexpected reference count for OTR BrowserContext. Did you use " | 151 | "Unexpected reference count for OTR BrowserContext. Did you use " |
301 | 128 | "scoped_refptr instead of ScopedBrowserContext?"; | 152 | "scoped_refptr instead of ScopedBrowserContext?"; |
302 | 153 | devtools_http_handler_->Stop(); | ||
303 | 129 | } | 154 | } |
304 | 130 | 155 | ||
305 | 131 | BrowserContext* BrowserContextImpl::GetOffTheRecordContext() { | 156 | BrowserContext* BrowserContextImpl::GetOffTheRecordContext() { |
306 | @@ -189,4 +214,12 @@ | |||
307 | 189 | return user_script_manager_; | 214 | return user_script_manager_; |
308 | 190 | } | 215 | } |
309 | 191 | 216 | ||
310 | 217 | bool BrowserContextImpl::GetDevtoolsEnabled() const FINAL { | ||
311 | 218 | return devtools_enabled_; | ||
312 | 219 | } | ||
313 | 220 | |||
314 | 221 | int BrowserContextImpl::GetDevtoolsPort() const FINAL { | ||
315 | 222 | return devtools_port_; | ||
316 | 223 | } | ||
317 | 224 | |||
318 | 192 | } // namespace oxide | 225 | } // namespace oxide |
319 | 193 | 226 | ||
320 | === modified file 'shared/browser/oxide_browser_context_impl.h' | |||
321 | --- shared/browser/oxide_browser_context_impl.h 2014-05-22 08:09:28 +0000 | |||
322 | +++ shared/browser/oxide_browser_context_impl.h 2014-06-24 11:52:03 +0000 | |||
323 | @@ -27,6 +27,10 @@ | |||
324 | 27 | #include "oxide_browser_context.h" | 27 | #include "oxide_browser_context.h" |
325 | 28 | #include "oxide_user_script_master.h" | 28 | #include "oxide_user_script_master.h" |
326 | 29 | 29 | ||
327 | 30 | namespace content { | ||
328 | 31 | class DevToolsHttpHandler; | ||
329 | 32 | } | ||
330 | 33 | |||
331 | 30 | namespace oxide { | 34 | namespace oxide { |
332 | 31 | 35 | ||
333 | 32 | class OffTheRecordBrowserContextImpl; | 36 | class OffTheRecordBrowserContextImpl; |
334 | @@ -85,6 +89,9 @@ | |||
335 | 85 | void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL; | 89 | void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL; |
336 | 86 | void SetIsPopupBlockerEnabled(bool enabled) FINAL; | 90 | void SetIsPopupBlockerEnabled(bool enabled) FINAL; |
337 | 87 | 91 | ||
338 | 92 | bool GetDevtoolsEnabled() const FINAL; | ||
339 | 93 | int GetDevtoolsPort() const FINAL; | ||
340 | 94 | |||
341 | 88 | UserScriptMaster& UserScriptManager() FINAL; | 95 | UserScriptMaster& UserScriptManager() FINAL; |
342 | 89 | 96 | ||
343 | 90 | private: | 97 | private: |
344 | @@ -96,6 +103,9 @@ | |||
345 | 96 | std::string product_; | 103 | std::string product_; |
346 | 97 | bool default_user_agent_string_; | 104 | bool default_user_agent_string_; |
347 | 98 | UserScriptMaster user_script_manager_; | 105 | UserScriptMaster user_script_manager_; |
348 | 106 | content::DevToolsHttpHandler* devtools_http_handler_; | ||
349 | 107 | bool devtools_enabled_; | ||
350 | 108 | int devtools_port_; | ||
351 | 99 | 109 | ||
352 | 100 | DISALLOW_COPY_AND_ASSIGN(BrowserContextImpl); | 110 | DISALLOW_COPY_AND_ASSIGN(BrowserContextImpl); |
353 | 101 | }; | 111 | }; |
354 | 102 | 112 | ||
355 | === added file 'shared/browser/oxide_devtools_http_handler_delegate.cc' | |||
356 | --- shared/browser/oxide_devtools_http_handler_delegate.cc 1970-01-01 00:00:00 +0000 | |||
357 | +++ shared/browser/oxide_devtools_http_handler_delegate.cc 2014-06-24 11:52:03 +0000 | |||
358 | @@ -0,0 +1,124 @@ | |||
359 | 1 | // vim:expandtab:shiftwidth=2:tabstop=2: | ||
360 | 2 | // Copyright (C) 2013 Canonical Ltd. | ||
361 | 3 | |||
362 | 4 | // This library is free software; you can redistribute it and/or | ||
363 | 5 | // modify it under the terms of the GNU Lesser General Public | ||
364 | 6 | // License as published by the Free Software Foundation; either | ||
365 | 7 | // version 2.1 of the License, or (at your option) any later version. | ||
366 | 8 | |||
367 | 9 | // This library is distributed in the hope that it will be useful, | ||
368 | 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
369 | 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
370 | 12 | // Lesser General Public License for more details. | ||
371 | 13 | |||
372 | 14 | // You should have received a copy of the GNU Lesser General Public | ||
373 | 15 | // License along with this library; if not, write to the Free Software | ||
374 | 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
375 | 17 | |||
376 | 18 | #include "oxide_devtools_http_handler_delegate.h" | ||
377 | 19 | |||
378 | 20 | #include "base/logging.h" | ||
379 | 21 | #include "base/path_service.h" | ||
380 | 22 | #include "base/strings/string_number_conversions.h" | ||
381 | 23 | #include "content/public/browser/web_contents.h" | ||
382 | 24 | #include "content/public/browser/devtools_target.h" | ||
383 | 25 | #include "content/public/browser/devtools_http_handler.h" | ||
384 | 26 | #include "content/public/common/url_constants.h" | ||
385 | 27 | #include "net/socket/tcp_listen_socket.h" | ||
386 | 28 | #include "net/url_request/url_request_context_getter.h" | ||
387 | 29 | #include "ui/base/resource/resource_bundle.h" | ||
388 | 30 | |||
389 | 31 | #include "oxide_devtools_target.h" | ||
390 | 32 | #include "oxide_io_thread.h" | ||
391 | 33 | #include "oxide_web_view.h" | ||
392 | 34 | |||
393 | 35 | #include "grit/oxide_resources.h" | ||
394 | 36 | |||
395 | 37 | using content::DevToolsTarget; | ||
396 | 38 | using content::RenderViewHost; | ||
397 | 39 | using content::WebContents; | ||
398 | 40 | |||
399 | 41 | |||
400 | 42 | namespace oxide { | ||
401 | 43 | |||
402 | 44 | DevtoolsHttpHandlerDelegate::DevtoolsHttpHandlerDelegate( | ||
403 | 45 | const std::string& ip, | ||
404 | 46 | unsigned port, | ||
405 | 47 | BrowserContext * attached_browser_context) | ||
406 | 48 | : ip_(ip), | ||
407 | 49 | port_(port), | ||
408 | 50 | browser_context_(attached_browser_context) { | ||
409 | 51 | LOG(INFO) << "DevTools instance running " | ||
410 | 52 | << GetLocalDevToolsUrl(); | ||
411 | 53 | } | ||
412 | 54 | |||
413 | 55 | DevtoolsHttpHandlerDelegate::~DevtoolsHttpHandlerDelegate() { | ||
414 | 56 | } | ||
415 | 57 | |||
416 | 58 | std::string DevtoolsHttpHandlerDelegate::GetDiscoveryPageHTML() { | ||
417 | 59 | return ui::ResourceBundle::GetSharedInstance().GetRawDataResource( | ||
418 | 60 | IDR_OXIDE_DEVTOOLS_DISCOVERY_HTML_PAGE).as_string(); | ||
419 | 61 | } | ||
420 | 62 | |||
421 | 63 | std::string | ||
422 | 64 | DevtoolsHttpHandlerDelegate::GetLocalDevToolsUrl() const { | ||
423 | 65 | std::ostringstream oss; | ||
424 | 66 | oss << "http://" | ||
425 | 67 | << ip_ | ||
426 | 68 | << ":" | ||
427 | 69 | << port_; | ||
428 | 70 | return oss.str(); | ||
429 | 71 | } | ||
430 | 72 | |||
431 | 73 | bool DevtoolsHttpHandlerDelegate::BundlesFrontendResources() { | ||
432 | 74 | // We reuse the default chrome builtin webui from devtools_resources.pak | ||
433 | 75 | return true; | ||
434 | 76 | } | ||
435 | 77 | |||
436 | 78 | base::FilePath DevtoolsHttpHandlerDelegate::GetDebugFrontendDir() { | ||
437 | 79 | // We dont host the devtools resources & ui (see above). | ||
438 | 80 | return base::FilePath(); | ||
439 | 81 | } | ||
440 | 82 | |||
441 | 83 | std::string DevtoolsHttpHandlerDelegate::GetPageThumbnailData( | ||
442 | 84 | const GURL& url) { | ||
443 | 85 | return std::string(); | ||
444 | 86 | } | ||
445 | 87 | |||
446 | 88 | scoped_ptr<DevToolsTarget> | ||
447 | 89 | DevtoolsHttpHandlerDelegate::CreateNewTarget(const GURL& url) { | ||
448 | 90 | // Not supported | ||
449 | 91 | return scoped_ptr<DevToolsTarget>(); | ||
450 | 92 | } | ||
451 | 93 | |||
452 | 94 | void DevtoolsHttpHandlerDelegate::EnumerateTargets(TargetCallback callback) { | ||
453 | 95 | TargetList targetList; | ||
454 | 96 | std::set<WebView*> wvl = | ||
455 | 97 | WebView::GetAllWebViewsFor(browser_context_); | ||
456 | 98 | if (!wvl.empty()) { | ||
457 | 99 | std::set<WebView*>::iterator it = wvl.begin(); | ||
458 | 100 | for (; it != wvl.end(); ++it) { | ||
459 | 101 | DCHECK(*it) << "Invalid WebView instance (NULL)"; | ||
460 | 102 | |||
461 | 103 | content::WebContents * web_contents = | ||
462 | 104 | (*it)->GetWebContents(); | ||
463 | 105 | if (web_contents) { | ||
464 | 106 | // The receiver of the target list is the owner of the content | ||
465 | 107 | // See content/public/browser/devtools_http_handler_delegate.h | ||
466 | 108 | targetList.push_back( | ||
467 | 109 | DevtoolsTarget::CreateForWebContents(web_contents)); | ||
468 | 110 | } | ||
469 | 111 | } | ||
470 | 112 | } | ||
471 | 113 | callback.Run(targetList); | ||
472 | 114 | } | ||
473 | 115 | |||
474 | 116 | scoped_ptr<net::StreamListenSocket> | ||
475 | 117 | DevtoolsHttpHandlerDelegate::CreateSocketForTethering( | ||
476 | 118 | net::StreamListenSocket::Delegate* delegate, | ||
477 | 119 | std::string* name) { | ||
478 | 120 | // Not supported | ||
479 | 121 | return scoped_ptr<net::StreamListenSocket>(); | ||
480 | 122 | } | ||
481 | 123 | |||
482 | 124 | } | ||
483 | 0 | 125 | ||
484 | === added file 'shared/browser/oxide_devtools_http_handler_delegate.h' | |||
485 | --- shared/browser/oxide_devtools_http_handler_delegate.h 1970-01-01 00:00:00 +0000 | |||
486 | +++ shared/browser/oxide_devtools_http_handler_delegate.h 2014-06-24 11:52:03 +0000 | |||
487 | @@ -0,0 +1,71 @@ | |||
488 | 1 | // vim:expandtab:shiftwidth=2:tabstop=2: | ||
489 | 2 | // Copyright (C) 2014 Canonical Ltd. | ||
490 | 3 | |||
491 | 4 | // This library is free software; you can redistribute it and/or | ||
492 | 5 | // modify it under the terms of the GNU Lesser General Public | ||
493 | 6 | // License as published by the Free Software Foundation; either | ||
494 | 7 | // version 2.1 of the License, or (at your option) any later version. | ||
495 | 8 | |||
496 | 9 | // This library is distributed in the hope that it will be useful, | ||
497 | 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
498 | 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
499 | 12 | // Lesser General Public License for more details. | ||
500 | 13 | |||
501 | 14 | // You should have received a copy of the GNU Lesser General Public | ||
502 | 15 | // License along with this library; if not, write to the Free Software | ||
503 | 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
504 | 17 | |||
505 | 18 | #ifndef _OXIDE_SHARED_BROWSER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ | ||
506 | 19 | #define _OXIDE_SHARED_BROWSER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ | ||
507 | 20 | |||
508 | 21 | #include <string> | ||
509 | 22 | |||
510 | 23 | #include "base/basictypes.h" | ||
511 | 24 | #include "base/compiler_specific.h" | ||
512 | 25 | #include "content/public/browser/devtools_http_handler_delegate.h" | ||
513 | 26 | |||
514 | 27 | namespace content { | ||
515 | 28 | class DevToolsTarget; | ||
516 | 29 | class DevToolsHttpHandler; | ||
517 | 30 | } | ||
518 | 31 | |||
519 | 32 | namespace oxide { | ||
520 | 33 | |||
521 | 34 | class BrowserContext; | ||
522 | 35 | |||
523 | 36 | class DevtoolsHttpHandlerDelegate | ||
524 | 37 | : public content::DevToolsHttpHandlerDelegate { | ||
525 | 38 | public: | ||
526 | 39 | |||
527 | 40 | DevtoolsHttpHandlerDelegate( | ||
528 | 41 | const std::string& ip, | ||
529 | 42 | unsigned port, | ||
530 | 43 | BrowserContext* attached_browser_context); | ||
531 | 44 | virtual ~DevtoolsHttpHandlerDelegate(); | ||
532 | 45 | |||
533 | 46 | // DevToolsHttpProtocolHandler::Delegate overrides. | ||
534 | 47 | virtual std::string GetDiscoveryPageHTML() OVERRIDE; | ||
535 | 48 | virtual bool BundlesFrontendResources() OVERRIDE; | ||
536 | 49 | virtual base::FilePath GetDebugFrontendDir() OVERRIDE; | ||
537 | 50 | virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE; | ||
538 | 51 | virtual scoped_ptr<content::DevToolsTarget> CreateNewTarget( | ||
539 | 52 | const GURL& url) OVERRIDE; | ||
540 | 53 | virtual void EnumerateTargets(TargetCallback callback) OVERRIDE; | ||
541 | 54 | virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( | ||
542 | 55 | net::StreamListenSocket::Delegate* delegate, | ||
543 | 56 | std::string* name) OVERRIDE; | ||
544 | 57 | |||
545 | 58 | private: | ||
546 | 59 | |||
547 | 60 | std::string GetLocalDevToolsUrl() const; | ||
548 | 61 | |||
549 | 62 | std::string ip_; | ||
550 | 63 | unsigned port_; | ||
551 | 64 | BrowserContext* browser_context_; | ||
552 | 65 | DISALLOW_COPY_AND_ASSIGN(DevtoolsHttpHandlerDelegate); | ||
553 | 66 | }; | ||
554 | 67 | |||
555 | 68 | } | ||
556 | 69 | |||
557 | 70 | #endif // _OXIDE_SHARED_BROWSER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ | ||
558 | 71 | |||
559 | 0 | 72 | ||
560 | === added file 'shared/browser/oxide_devtools_target.cc' | |||
561 | --- shared/browser/oxide_devtools_target.cc 1970-01-01 00:00:00 +0000 | |||
562 | +++ shared/browser/oxide_devtools_target.cc 2014-06-24 11:52:03 +0000 | |||
563 | @@ -0,0 +1,125 @@ | |||
564 | 1 | // vim:expandtab:shiftwidth=2:tabstop=2: | ||
565 | 2 | // Copyright (C) 2014 Canonical Ltd. | ||
566 | 3 | |||
567 | 4 | // This library is free software; you can redistribute it and/or | ||
568 | 5 | // modify it under the terms of the GNU Lesser General Public | ||
569 | 6 | // License as published by the Free Software Foundation; either | ||
570 | 7 | // version 2.1 of the License, or (at your option) any later version. | ||
571 | 8 | |||
572 | 9 | // This library is distributed in the hope that it will be useful, | ||
573 | 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
574 | 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
575 | 12 | // Lesser General Public License for more details. | ||
576 | 13 | |||
577 | 14 | // You should have received a copy of the GNU Lesser General Public | ||
578 | 15 | // License along with this library; if not, write to the Free Software | ||
579 | 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
580 | 17 | |||
581 | 18 | #include "oxide_devtools_target.h" | ||
582 | 19 | |||
583 | 20 | #include "base/logging.h" | ||
584 | 21 | #include "base/strings/utf_string_conversions.h" | ||
585 | 22 | #include "content/public/browser/devtools_agent_host.h" | ||
586 | 23 | #include "content/public/browser/devtools_target.h" | ||
587 | 24 | #include "content/public/browser/devtools_http_handler.h" | ||
588 | 25 | #include "content/public/browser/render_view_host.h" | ||
589 | 26 | #include "content/public/browser/web_contents.h" | ||
590 | 27 | #include "content/public/browser/web_contents_delegate.h" | ||
591 | 28 | #include "content/public/common/url_constants.h" | ||
592 | 29 | |||
593 | 30 | using content::DevToolsAgentHost; | ||
594 | 31 | using content::DevToolsTarget; | ||
595 | 32 | using content::RenderViewHost; | ||
596 | 33 | using content::WebContents; | ||
597 | 34 | |||
598 | 35 | namespace oxide { | ||
599 | 36 | |||
600 | 37 | // static | ||
601 | 38 | DevtoolsTarget* DevtoolsTarget::CreateForWebContents( | ||
602 | 39 | content::WebContents * web_contents) { | ||
603 | 40 | DCHECK(web_contents); | ||
604 | 41 | return new DevtoolsTarget(web_contents); | ||
605 | 42 | } | ||
606 | 43 | |||
607 | 44 | DevtoolsTarget::DevtoolsTarget( | ||
608 | 45 | content::WebContents * wc) | ||
609 | 46 | : content::WebContentsObserver(wc) { | ||
610 | 47 | DCHECK(wc); | ||
611 | 48 | |||
612 | 49 | agent_host_ = DevToolsAgentHost::GetOrCreateFor(web_contents()); | ||
613 | 50 | } | ||
614 | 51 | |||
615 | 52 | DevtoolsTarget::~DevtoolsTarget() { | ||
616 | 53 | } | ||
617 | 54 | |||
618 | 55 | std::string DevtoolsTarget::GetId() const { | ||
619 | 56 | return agent_host_ ? agent_host_->GetId() : std::string(); | ||
620 | 57 | } | ||
621 | 58 | |||
622 | 59 | std::string DevtoolsTarget::GetParentId() const { | ||
623 | 60 | return std::string(); | ||
624 | 61 | } | ||
625 | 62 | |||
626 | 63 | std::string DevtoolsTarget::GetType() const { | ||
627 | 64 | return std::string(); | ||
628 | 65 | } | ||
629 | 66 | |||
630 | 67 | std::string DevtoolsTarget::GetTitle() const { | ||
631 | 68 | const content::WebContents* wc = web_contents(); | ||
632 | 69 | if (!wc) { | ||
633 | 70 | return std::string(); | ||
634 | 71 | } | ||
635 | 72 | |||
636 | 73 | return base::UTF16ToUTF8(wc->GetTitle()); | ||
637 | 74 | } | ||
638 | 75 | |||
639 | 76 | std::string DevtoolsTarget::GetDescription() const { | ||
640 | 77 | return std::string(); | ||
641 | 78 | } | ||
642 | 79 | |||
643 | 80 | GURL DevtoolsTarget::GetURL() const { | ||
644 | 81 | const content::WebContents* wc = web_contents(); | ||
645 | 82 | if (!wc) { | ||
646 | 83 | return GURL(); | ||
647 | 84 | } | ||
648 | 85 | |||
649 | 86 | return wc->GetVisibleURL(); | ||
650 | 87 | } | ||
651 | 88 | |||
652 | 89 | GURL DevtoolsTarget::GetFaviconURL() const { | ||
653 | 90 | return GURL(); | ||
654 | 91 | } | ||
655 | 92 | |||
656 | 93 | base::TimeTicks DevtoolsTarget::GetLastActivityTime() const { | ||
657 | 94 | const content::WebContents* wc = web_contents(); | ||
658 | 95 | if (!wc) { | ||
659 | 96 | return base::TimeTicks(); | ||
660 | 97 | } | ||
661 | 98 | |||
662 | 99 | return wc->GetLastActiveTime(); | ||
663 | 100 | } | ||
664 | 101 | |||
665 | 102 | bool DevtoolsTarget::IsAttached() const { | ||
666 | 103 | return agent_host_->IsAttached(); | ||
667 | 104 | } | ||
668 | 105 | |||
669 | 106 | scoped_refptr<DevToolsAgentHost> DevtoolsTarget::GetAgentHost() const { | ||
670 | 107 | return agent_host_; | ||
671 | 108 | } | ||
672 | 109 | |||
673 | 110 | bool DevtoolsTarget::Activate() const { | ||
674 | 111 | content::WebContents* wc = web_contents(); | ||
675 | 112 | if (!wc) { | ||
676 | 113 | return false; | ||
677 | 114 | } | ||
678 | 115 | |||
679 | 116 | wc->GetDelegate()->ActivateContents(wc); | ||
680 | 117 | return true; | ||
681 | 118 | } | ||
682 | 119 | |||
683 | 120 | bool DevtoolsTarget::Close() const { | ||
684 | 121 | NOTIMPLEMENTED(); | ||
685 | 122 | return false; | ||
686 | 123 | } | ||
687 | 124 | |||
688 | 125 | } | ||
689 | 0 | 126 | ||
690 | === added file 'shared/browser/oxide_devtools_target.h' | |||
691 | --- shared/browser/oxide_devtools_target.h 1970-01-01 00:00:00 +0000 | |||
692 | +++ shared/browser/oxide_devtools_target.h 2014-06-24 11:52:03 +0000 | |||
693 | @@ -0,0 +1,72 @@ | |||
694 | 1 | // vim:expandtab:shiftwidth=2:tabstop=2: | ||
695 | 2 | // Copyright (C) 2014 Canonical Ltd. | ||
696 | 3 | |||
697 | 4 | // This library is free software; you can redistribute it and/or | ||
698 | 5 | // modify it under the terms of the GNU Lesser General Public | ||
699 | 6 | // License as published by the Free Software Foundation; either | ||
700 | 7 | // version 2.1 of the License, or (at your option) any later version. | ||
701 | 8 | |||
702 | 9 | // This library is distributed in the hope that it will be useful, | ||
703 | 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
704 | 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
705 | 12 | // Lesser General Public License for more details. | ||
706 | 13 | |||
707 | 14 | // You should have received a copy of the GNU Lesser General Public | ||
708 | 15 | // License along with this library; if not, write to the Free Software | ||
709 | 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
710 | 17 | |||
711 | 18 | #ifndef _OXIDE_SHARED_BROWSER_DEVTOOLS_TARGET_H_ | ||
712 | 19 | #define _OXIDE_SHARED_BROWSER_DEVTOOLS_TARGET_H_ | ||
713 | 20 | |||
714 | 21 | #include <string> | ||
715 | 22 | |||
716 | 23 | #include "base/basictypes.h" | ||
717 | 24 | #include "base/compiler_specific.h" | ||
718 | 25 | #include "content/public/browser/devtools_target.h" | ||
719 | 26 | #include "content/public/browser/web_contents_observer.h" | ||
720 | 27 | |||
721 | 28 | namespace content { | ||
722 | 29 | class DevToolsTarget; | ||
723 | 30 | class DevToolsAgentHost; | ||
724 | 31 | class RenderViewHost; | ||
725 | 32 | class WebContents; | ||
726 | 33 | } | ||
727 | 34 | |||
728 | 35 | namespace oxide { | ||
729 | 36 | |||
730 | 37 | class DevtoolsTarget | ||
731 | 38 | : public content::DevToolsTarget, | ||
732 | 39 | public content::WebContentsObserver | ||
733 | 40 | { | ||
734 | 41 | public: | ||
735 | 42 | |||
736 | 43 | virtual ~DevtoolsTarget(); | ||
737 | 44 | |||
738 | 45 | static DevtoolsTarget * CreateForWebContents(content::WebContents *); | ||
739 | 46 | |||
740 | 47 | // DevToolsHttpProtocolHandler::Delegate overrides. | ||
741 | 48 | virtual std::string GetId() const OVERRIDE; | ||
742 | 49 | virtual std::string GetParentId() const OVERRIDE; | ||
743 | 50 | virtual std::string GetType() const OVERRIDE; | ||
744 | 51 | virtual std::string GetTitle() const OVERRIDE; | ||
745 | 52 | virtual std::string GetDescription() const OVERRIDE; | ||
746 | 53 | virtual GURL GetURL() const OVERRIDE; | ||
747 | 54 | virtual GURL GetFaviconURL() const OVERRIDE; | ||
748 | 55 | virtual base::TimeTicks GetLastActivityTime() const OVERRIDE; | ||
749 | 56 | virtual bool IsAttached() const OVERRIDE; | ||
750 | 57 | virtual scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const OVERRIDE; | ||
751 | 58 | virtual bool Activate() const OVERRIDE; | ||
752 | 59 | virtual bool Close() const OVERRIDE; | ||
753 | 60 | |||
754 | 61 | private: | ||
755 | 62 | DevtoolsTarget(content::WebContents * web_contents); | ||
756 | 63 | |||
757 | 64 | scoped_refptr<content::DevToolsAgentHost> agent_host_; | ||
758 | 65 | |||
759 | 66 | DISALLOW_COPY_AND_ASSIGN(DevtoolsTarget); | ||
760 | 67 | }; | ||
761 | 68 | |||
762 | 69 | } | ||
763 | 70 | |||
764 | 71 | #endif // _OXIDE_SHARED_BROWSER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ | ||
765 | 72 | |||
766 | 0 | 73 | ||
767 | === modified file 'shared/browser/oxide_off_the_record_browser_context_impl.cc' | |||
768 | --- shared/browser/oxide_off_the_record_browser_context_impl.cc 2014-05-22 08:09:28 +0000 | |||
769 | +++ shared/browser/oxide_off_the_record_browser_context_impl.cc 2014-06-24 11:52:03 +0000 | |||
770 | @@ -112,4 +112,13 @@ | |||
771 | 112 | return original_context_->UserScriptManager(); | 112 | return original_context_->UserScriptManager(); |
772 | 113 | } | 113 | } |
773 | 114 | 114 | ||
774 | 115 | bool OffTheRecordBrowserContextImpl::GetDevtoolsEnabled() const { | ||
775 | 116 | return original_context_->GetDevtoolsEnabled(); | ||
776 | 117 | } | ||
777 | 118 | |||
778 | 119 | int OffTheRecordBrowserContextImpl::GetDevtoolsPort() const { | ||
779 | 120 | return original_context_->GetDevtoolsPort(); | ||
780 | 121 | } | ||
781 | 122 | |||
782 | 123 | |||
783 | 115 | } // namespace oxide | 124 | } // namespace oxide |
784 | 116 | 125 | ||
785 | === modified file 'shared/browser/oxide_off_the_record_browser_context_impl.h' | |||
786 | --- shared/browser/oxide_off_the_record_browser_context_impl.h 2014-05-22 08:09:28 +0000 | |||
787 | +++ shared/browser/oxide_off_the_record_browser_context_impl.h 2014-06-24 11:52:03 +0000 | |||
788 | @@ -66,6 +66,9 @@ | |||
789 | 66 | void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL; | 66 | void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL; |
790 | 67 | void SetIsPopupBlockerEnabled(bool enabled) FINAL; | 67 | void SetIsPopupBlockerEnabled(bool enabled) FINAL; |
791 | 68 | 68 | ||
792 | 69 | bool GetDevtoolsEnabled() const FINAL; | ||
793 | 70 | int GetDevtoolsPort() const FINAL; | ||
794 | 71 | |||
795 | 69 | UserScriptMaster& UserScriptManager() FINAL; | 72 | UserScriptMaster& UserScriptManager() FINAL; |
796 | 70 | 73 | ||
797 | 71 | private: | 74 | private: |
798 | 72 | 75 | ||
799 | === modified file 'shared/browser/oxide_web_view.cc' | |||
800 | --- shared/browser/oxide_web_view.cc 2014-06-19 17:41:21 +0000 | |||
801 | +++ shared/browser/oxide_web_view.cc 2014-06-24 11:52:03 +0000 | |||
802 | @@ -19,6 +19,7 @@ | |||
803 | 19 | 19 | ||
804 | 20 | #include <queue> | 20 | #include <queue> |
805 | 21 | 21 | ||
806 | 22 | #include "base/lazy_instance.h" | ||
807 | 22 | #include "base/logging.h" | 23 | #include "base/logging.h" |
808 | 23 | #include "base/strings/utf_string_conversions.h" | 24 | #include "base/strings/utf_string_conversions.h" |
809 | 24 | #include "base/supports_user_data.h" | 25 | #include "base/supports_user_data.h" |
810 | @@ -113,6 +114,27 @@ | |||
811 | 113 | view->Init(¶ms); | 114 | view->Init(¶ms); |
812 | 114 | } | 115 | } |
813 | 115 | 116 | ||
814 | 117 | typedef std::map<BrowserContext*, std::set<WebView*> > WebViewsPerContextMap; | ||
815 | 118 | base::LazyInstance<WebViewsPerContextMap> g_web_view_per_context; | ||
816 | 119 | |||
817 | 120 | } | ||
818 | 121 | |||
819 | 122 | // static | ||
820 | 123 | std::set<WebView*> | ||
821 | 124 | WebView::GetAllWebViewsFor(BrowserContext * browser_context) { | ||
822 | 125 | std::set<WebView*> webviews; | ||
823 | 126 | if (!browser_context) { | ||
824 | 127 | return webviews; | ||
825 | 128 | } | ||
826 | 129 | WebViewsPerContextMap::iterator it; | ||
827 | 130 | for (it = g_web_view_per_context.Get().begin(); | ||
828 | 131 | it != g_web_view_per_context.Get().end(); | ||
829 | 132 | ++it) { | ||
830 | 133 | if (browser_context->IsSameContext(it->first)) { | ||
831 | 134 | return it->second; | ||
832 | 135 | } | ||
833 | 136 | } | ||
834 | 137 | return webviews; | ||
835 | 116 | } | 138 | } |
836 | 117 | 139 | ||
837 | 118 | void WebView::DispatchLoadFailed(const GURL& validated_url, | 140 | void WebView::DispatchLoadFailed(const GURL& validated_url, |
838 | @@ -559,9 +581,25 @@ | |||
839 | 559 | : web_contents_helper_(NULL), | 581 | : web_contents_helper_(NULL), |
840 | 560 | initial_preferences_(NULL), | 582 | initial_preferences_(NULL), |
841 | 561 | root_frame_(NULL), | 583 | root_frame_(NULL), |
843 | 562 | is_fullscreen_(false) {} | 584 | is_fullscreen_(false) { |
844 | 585 | } | ||
845 | 563 | 586 | ||
846 | 564 | WebView::~WebView() { | 587 | WebView::~WebView() { |
847 | 588 | BrowserContext* context = | ||
848 | 589 | GetBrowserContext(); | ||
849 | 590 | WebViewsPerContextMap::iterator it = | ||
850 | 591 | g_web_view_per_context.Get().find(context); | ||
851 | 592 | if (it != g_web_view_per_context.Get().end()) { | ||
852 | 593 | std::set<WebView*>& wvl = it->second; | ||
853 | 594 | if (wvl.find(this) != wvl.end()) { | ||
854 | 595 | wvl.erase(this); | ||
855 | 596 | g_web_view_per_context.Get()[context] = wvl; | ||
856 | 597 | } | ||
857 | 598 | if (g_web_view_per_context.Get()[context].empty()) { | ||
858 | 599 | g_web_view_per_context.Get().erase(context); | ||
859 | 600 | } | ||
860 | 601 | } | ||
861 | 602 | |||
862 | 565 | if (root_frame_) { | 603 | if (root_frame_) { |
863 | 566 | root_frame_->Destroy(); | 604 | root_frame_->Destroy(); |
864 | 567 | } | 605 | } |
865 | @@ -632,7 +670,22 @@ | |||
866 | 632 | SetURL(initial_url_); | 670 | SetURL(initial_url_); |
867 | 633 | initial_url_ = GURL(); | 671 | initial_url_ = GURL(); |
868 | 634 | } | 672 | } |
869 | 673 | |||
870 | 635 | SetIsFullscreen(is_fullscreen_); | 674 | SetIsFullscreen(is_fullscreen_); |
871 | 675 | |||
872 | 676 | { | ||
873 | 677 | BrowserContext* context = | ||
874 | 678 | GetBrowserContext()->GetOriginalContext(); | ||
875 | 679 | WebViewsPerContextMap::iterator it = | ||
876 | 680 | g_web_view_per_context.Get().find(context); | ||
877 | 681 | if (it != g_web_view_per_context.Get().end()) { | ||
878 | 682 | g_web_view_per_context.Get()[context].insert(this); | ||
879 | 683 | } else { | ||
880 | 684 | std::set<WebView*> wvl; | ||
881 | 685 | wvl.insert(this); | ||
882 | 686 | g_web_view_per_context.Get()[context] = wvl; | ||
883 | 687 | } | ||
884 | 688 | } | ||
885 | 636 | } | 689 | } |
886 | 637 | 690 | ||
887 | 638 | // static | 691 | // static |
888 | 639 | 692 | ||
889 | === modified file 'shared/browser/oxide_web_view.h' | |||
890 | --- shared/browser/oxide_web_view.h 2014-06-19 17:41:21 +0000 | |||
891 | +++ shared/browser/oxide_web_view.h 2014-06-24 11:52:03 +0000 | |||
892 | @@ -20,6 +20,7 @@ | |||
893 | 20 | 20 | ||
894 | 21 | #include <string> | 21 | #include <string> |
895 | 22 | #include <vector> | 22 | #include <vector> |
896 | 23 | #include <set> | ||
897 | 23 | 24 | ||
898 | 24 | #include "base/basictypes.h" | 25 | #include "base/basictypes.h" |
899 | 25 | #include "base/compiler_specific.h" | 26 | #include "base/compiler_specific.h" |
900 | @@ -94,6 +95,9 @@ | |||
901 | 94 | static WebView* FromWebContents(const content::WebContents* web_contents); | 95 | static WebView* FromWebContents(const content::WebContents* web_contents); |
902 | 95 | static WebView* FromRenderViewHost(content::RenderViewHost* rvh); | 96 | static WebView* FromRenderViewHost(content::RenderViewHost* rvh); |
903 | 96 | 97 | ||
904 | 98 | static std::set<WebView*> GetAllWebViewsFor( | ||
905 | 99 | BrowserContext * browser_context); | ||
906 | 100 | |||
907 | 97 | const GURL& GetURL() const; | 101 | const GURL& GetURL() const; |
908 | 98 | void SetURL(const GURL& url); | 102 | void SetURL(const GURL& url); |
909 | 99 | 103 | ||
910 | 100 | 104 | ||
911 | === added directory 'shared/browser/resources' | |||
912 | === added file 'shared/browser/resources/devtools_discovery_page.html' | |||
913 | --- shared/browser/resources/devtools_discovery_page.html 1970-01-01 00:00:00 +0000 | |||
914 | +++ shared/browser/resources/devtools_discovery_page.html 2014-06-24 11:52:03 +0000 | |||
915 | @@ -0,0 +1,155 @@ | |||
916 | 1 | <html> | ||
917 | 2 | <head> | ||
918 | 3 | <title>Inspectable pages</title> | ||
919 | 4 | <style> | ||
920 | 5 | body { | ||
921 | 6 | background-color: rgb(245, 245, 245); | ||
922 | 7 | font-family: Helvetica, Arial, sans-serif; | ||
923 | 8 | text-shadow: rgba(255, 255, 255, 0.496094) 0px 1px 0px; | ||
924 | 9 | } | ||
925 | 10 | |||
926 | 11 | #caption { | ||
927 | 12 | color: black; | ||
928 | 13 | font-size: 16px; | ||
929 | 14 | margin-top: 30px; | ||
930 | 15 | margin-bottom: 0px; | ||
931 | 16 | margin-left: 70px; | ||
932 | 17 | height: 20px; | ||
933 | 18 | text-align: left; | ||
934 | 19 | } | ||
935 | 20 | |||
936 | 21 | #items { | ||
937 | 22 | display: -webkit-box; | ||
938 | 23 | margin-left: 60px; | ||
939 | 24 | margin-right: 60px; | ||
940 | 25 | -webkit-box-orient: horizontal; | ||
941 | 26 | -webkit-box-lines: multiple; | ||
942 | 27 | } | ||
943 | 28 | |||
944 | 29 | .frontend_ref { | ||
945 | 30 | color: black; | ||
946 | 31 | text-decoration: initial; | ||
947 | 32 | } | ||
948 | 33 | |||
949 | 34 | .thumbnail { | ||
950 | 35 | background-attachment: scroll; | ||
951 | 36 | background-origin: padding-box; | ||
952 | 37 | background-repeat: no-repeat; | ||
953 | 38 | border: 4px solid rgba(184, 184, 184, 1); | ||
954 | 39 | border-radius: 5px; | ||
955 | 40 | height: 132px; | ||
956 | 41 | width: 212px; | ||
957 | 42 | -webkit-transition-property: background-color, border-color; | ||
958 | 43 | -webkit-transition: background-color 0.15s, 0.15s; | ||
959 | 44 | -webkit-transition-delay: 0, 0; | ||
960 | 45 | } | ||
961 | 46 | |||
962 | 47 | .thumbnail:hover { | ||
963 | 48 | background-color: rgba(242, 242, 242, 1); | ||
964 | 49 | border-color: rgba(110, 116, 128, 1); | ||
965 | 50 | color: black; | ||
966 | 51 | } | ||
967 | 52 | |||
968 | 53 | .thumbnail.connected { | ||
969 | 54 | opacity: 0.5; | ||
970 | 55 | } | ||
971 | 56 | |||
972 | 57 | .thumbnail.connected:hover { | ||
973 | 58 | border-color: rgba(184, 184, 184, 1); | ||
974 | 59 | color: rgb(110, 116, 128); | ||
975 | 60 | } | ||
976 | 61 | |||
977 | 62 | .item { | ||
978 | 63 | display: inline-block; | ||
979 | 64 | margin: 5px; | ||
980 | 65 | margin-top: 15px; | ||
981 | 66 | height: 162px; | ||
982 | 67 | vertical-align: top; | ||
983 | 68 | width: 222px; | ||
984 | 69 | } | ||
985 | 70 | |||
986 | 71 | .text { | ||
987 | 72 | background: no-repeat 0; | ||
988 | 73 | background-size: 16px; | ||
989 | 74 | font-size: 12px; | ||
990 | 75 | margin: 4px 0px 0px 4px; | ||
991 | 76 | overflow: hidden; | ||
992 | 77 | padding: 2px 0px 0px 20px; | ||
993 | 78 | text-align: left; | ||
994 | 79 | text-overflow: ellipsis; | ||
995 | 80 | white-space: nowrap; | ||
996 | 81 | } | ||
997 | 82 | </style> | ||
998 | 83 | |||
999 | 84 | <script> | ||
1000 | 85 | |||
1001 | 86 | function onLoad() { | ||
1002 | 87 | var tabsListRequest = new XMLHttpRequest(); | ||
1003 | 88 | tabsListRequest.open('GET', '/json/list', true); | ||
1004 | 89 | tabsListRequest.onreadystatechange = onReady; | ||
1005 | 90 | tabsListRequest.send(); | ||
1006 | 91 | } | ||
1007 | 92 | |||
1008 | 93 | function onReady() { | ||
1009 | 94 | if(this.readyState == 4 && this.status == 200) { | ||
1010 | 95 | if(this.response != null) | ||
1011 | 96 | var responseJSON = JSON.parse(this.response); | ||
1012 | 97 | for (var i = 0; i < responseJSON.length; ++i) | ||
1013 | 98 | appendItem(responseJSON[i]); | ||
1014 | 99 | } | ||
1015 | 100 | } | ||
1016 | 101 | |||
1017 | 102 | function overrideFrontendUrl(item) { | ||
1018 | 103 | if (window.location.hash) { | ||
1019 | 104 | var overridden_url = window.location.hash.substr(1); | ||
1020 | 105 | var ws_suffix = item.webSocketDebuggerUrl.replace('ws://', 'ws='); | ||
1021 | 106 | if (overridden_url.indexOf('?') == -1) | ||
1022 | 107 | return overridden_url + '?' + ws_suffix; | ||
1023 | 108 | else | ||
1024 | 109 | return overridden_url + '&' + ws_suffix; | ||
1025 | 110 | } | ||
1026 | 111 | return item.devtoolsFrontendUrl; | ||
1027 | 112 | } | ||
1028 | 113 | |||
1029 | 114 | function appendItem(item_object) { | ||
1030 | 115 | var frontend_ref; | ||
1031 | 116 | if (item_object.devtoolsFrontendUrl) { | ||
1032 | 117 | frontend_ref = document.createElement('a'); | ||
1033 | 118 | frontend_ref.href = overrideFrontendUrl(item_object); | ||
1034 | 119 | frontend_ref.title = item_object.title; | ||
1035 | 120 | } else { | ||
1036 | 121 | frontend_ref = document.createElement('div'); | ||
1037 | 122 | frontend_ref.title = 'The tab already has an active debug session'; | ||
1038 | 123 | } | ||
1039 | 124 | frontend_ref.className = 'frontend_ref'; | ||
1040 | 125 | |||
1041 | 126 | var thumbnail = document.createElement('div'); | ||
1042 | 127 | thumbnail.className = item_object.devtoolsFrontendUrl ? | ||
1043 | 128 | 'thumbnail' : 'thumbnail connected'; | ||
1044 | 129 | thumbnail.style.cssText = 'background-image:url(' + | ||
1045 | 130 | item_object.thumbnailUrl + | ||
1046 | 131 | ')'; | ||
1047 | 132 | frontend_ref.appendChild(thumbnail); | ||
1048 | 133 | |||
1049 | 134 | var text = document.createElement('div'); | ||
1050 | 135 | text.className = 'text'; | ||
1051 | 136 | text.innerText = item_object.description || item_object.title; | ||
1052 | 137 | text.style.cssText = 'background-image:url(' + | ||
1053 | 138 | item_object.faviconUrl + ')'; | ||
1054 | 139 | frontend_ref.appendChild(text); | ||
1055 | 140 | |||
1056 | 141 | var item = document.createElement('p'); | ||
1057 | 142 | item.className = 'item'; | ||
1058 | 143 | item.appendChild(frontend_ref); | ||
1059 | 144 | |||
1060 | 145 | document.getElementById('items').appendChild(item); | ||
1061 | 146 | } | ||
1062 | 147 | </script> | ||
1063 | 148 | </head> | ||
1064 | 149 | <body onload='onLoad()'> | ||
1065 | 150 | <div id='caption'>Inspectable pages</div> | ||
1066 | 151 | <div id='items'> | ||
1067 | 152 | </div> | ||
1068 | 153 | <hr> | ||
1069 | 154 | </body> | ||
1070 | 155 | </html> | ||
1071 | 0 | 156 | ||
1072 | === modified file 'shared/oxide_resources.grd' | |||
1073 | --- shared/oxide_resources.grd 2014-02-28 12:53:41 +0000 | |||
1074 | +++ shared/oxide_resources.grd 2014-06-24 11:52:03 +0000 | |||
1075 | @@ -9,6 +9,7 @@ | |||
1076 | 9 | <release seq="1"> | 9 | <release seq="1"> |
1077 | 10 | <includes> | 10 | <includes> |
1078 | 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" /> |
1079 | 12 | <include name="IDR_OXIDE_DEVTOOLS_DISCOVERY_HTML_PAGE" file="browser/resources/devtools_discovery_page.html" type="BINDATA" /> | ||
1080 | 12 | </includes> | 13 | </includes> |
1081 | 13 | </release> | 14 | </release> |
1082 | 14 | </grit> | 15 | </grit> |
1083 | 15 | 16 | ||
1084 | === modified file 'shared/shared.gyp' | |||
1085 | --- shared/shared.gyp 2014-06-19 17:41:21 +0000 | |||
1086 | +++ shared/shared.gyp 2014-06-24 11:52:03 +0000 | |||
1087 | @@ -42,6 +42,7 @@ | |||
1088 | 42 | 'dependencies': [ | 42 | 'dependencies': [ |
1089 | 43 | 'oxide_extra_resources', | 43 | 'oxide_extra_resources', |
1090 | 44 | '<(DEPTH)/content/content_resources.gyp:content_resources', | 44 | '<(DEPTH)/content/content_resources.gyp:content_resources', |
1091 | 45 | '<(DEPTH)/content/browser/devtools/devtools_resources.gyp:devtools_resources', | ||
1092 | 45 | '<(DEPTH)/net/net.gyp:net_resources', | 46 | '<(DEPTH)/net/net.gyp:net_resources', |
1093 | 46 | '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources', | 47 | '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources', |
1094 | 47 | '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources', | 48 | '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources', |
1095 | @@ -53,6 +54,7 @@ | |||
1096 | 53 | 'variables': { | 54 | 'variables': { |
1097 | 54 | 'pak_inputs': [ | 55 | 'pak_inputs': [ |
1098 | 55 | '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', | 56 | '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', |
1099 | 57 | '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak', | ||
1100 | 56 | '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', | 58 | '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', |
1101 | 57 | '<(SHARED_INTERMEDIATE_DIR)/oxide/oxide_resources.pak', | 59 | '<(SHARED_INTERMEDIATE_DIR)/oxide/oxide_resources.pak', |
1102 | 58 | '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak', | 60 | '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak', |
1103 | @@ -226,6 +228,10 @@ | |||
1104 | 226 | 'browser/oxide_content_browser_client.cc', | 228 | 'browser/oxide_content_browser_client.cc', |
1105 | 227 | 'browser/oxide_content_browser_client.h', | 229 | 'browser/oxide_content_browser_client.h', |
1106 | 228 | 'browser/oxide_default_screen_info.h', | 230 | 'browser/oxide_default_screen_info.h', |
1107 | 231 | 'browser/oxide_devtools_http_handler_delegate.cc', | ||
1108 | 232 | 'browser/oxide_devtools_http_handler_delegate.h', | ||
1109 | 233 | 'browser/oxide_devtools_target.cc', | ||
1110 | 234 | 'browser/oxide_devtools_target.h', | ||
1111 | 229 | 'browser/oxide_file_picker.cc', | 235 | 'browser/oxide_file_picker.cc', |
1112 | 230 | 'browser/oxide_file_picker.h', | 236 | 'browser/oxide_file_picker.h', |
1113 | 231 | 'browser/oxide_form_factor.h', | 237 | 'browser/oxide_form_factor.h', |
Left my comments inline :)