OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/devtools/devtools_ui_bindings.h" | 5 #include "chrome/browser/devtools/devtools_ui_bindings.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 ~DefaultBindingsDelegate() override {} | 202 ~DefaultBindingsDelegate() override {} |
203 | 203 |
204 void ActivateWindow() override; | 204 void ActivateWindow() override; |
205 void CloseWindow() override {} | 205 void CloseWindow() override {} |
206 void Inspect(scoped_refptr<content::DevToolsAgentHost> host) override {} | 206 void Inspect(scoped_refptr<content::DevToolsAgentHost> host) override {} |
207 void SetInspectedPageBounds(const gfx::Rect& rect) override {} | 207 void SetInspectedPageBounds(const gfx::Rect& rect) override {} |
208 void InspectElementCompleted() override {} | 208 void InspectElementCompleted() override {} |
209 void SetIsDocked(bool is_docked) override {} | 209 void SetIsDocked(bool is_docked) override {} |
210 void OpenInNewTab(const std::string& url) override; | 210 void OpenInNewTab(const std::string& url) override; |
211 void SetWhitelistedShortcuts(const std::string& message) override {} | 211 void SetWhitelistedShortcuts(const std::string& message) override {} |
| 212 void SetEyeDropperActive(bool active) override {} |
212 void OpenNodeFrontend() override {} | 213 void OpenNodeFrontend() override {} |
213 using DispatchCallback = | 214 using DispatchCallback = |
214 DevToolsEmbedderMessageDispatcher::Delegate::DispatchCallback; | 215 DevToolsEmbedderMessageDispatcher::Delegate::DispatchCallback; |
215 | 216 |
216 void InspectedContentsClosing() override; | 217 void InspectedContentsClosing() override; |
217 void OnLoadCompleted() override {} | 218 void OnLoadCompleted() override {} |
218 void ReadyForTest() override {} | 219 void ReadyForTest() override {} |
219 InfoBarService* GetInfoBarService() override; | 220 InfoBarService* GetInfoBarService() override; |
220 void RenderProcessGone(bool crashed) override {} | 221 void RenderProcessGone(bool crashed) override {} |
221 | 222 |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 Bind(&DevToolsUIBindings::SearchCompleted, | 846 Bind(&DevToolsUIBindings::SearchCompleted, |
846 weak_factory_.GetWeakPtr(), | 847 weak_factory_.GetWeakPtr(), |
847 search_request_id, | 848 search_request_id, |
848 file_system_path)); | 849 file_system_path)); |
849 } | 850 } |
850 | 851 |
851 void DevToolsUIBindings::SetWhitelistedShortcuts(const std::string& message) { | 852 void DevToolsUIBindings::SetWhitelistedShortcuts(const std::string& message) { |
852 delegate_->SetWhitelistedShortcuts(message); | 853 delegate_->SetWhitelistedShortcuts(message); |
853 } | 854 } |
854 | 855 |
| 856 void DevToolsUIBindings::SetEyeDropperActive(bool active) { |
| 857 delegate_->SetEyeDropperActive(active); |
| 858 } |
| 859 |
855 void DevToolsUIBindings::ShowCertificateViewer(const std::string& cert_chain) { | 860 void DevToolsUIBindings::ShowCertificateViewer(const std::string& cert_chain) { |
856 std::unique_ptr<base::Value> value = | 861 std::unique_ptr<base::Value> value = |
857 base::JSONReader::Read(cert_chain); | 862 base::JSONReader::Read(cert_chain); |
858 if (!value || value->GetType() != base::Value::Type::LIST) { | 863 if (!value || value->GetType() != base::Value::Type::LIST) { |
859 NOTREACHED(); | 864 NOTREACHED(); |
860 return; | 865 return; |
861 } | 866 } |
862 | 867 |
863 std::unique_ptr<base::ListValue> list = | 868 std::unique_ptr<base::ListValue> list = |
864 base::ListValue::From(std::move(value)); | 869 base::ListValue::From(std::move(value)); |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 void DevToolsUIBindings::FrontendLoaded() { | 1372 void DevToolsUIBindings::FrontendLoaded() { |
1368 if (frontend_loaded_) | 1373 if (frontend_loaded_) |
1369 return; | 1374 return; |
1370 frontend_loaded_ = true; | 1375 frontend_loaded_ = true; |
1371 | 1376 |
1372 // Call delegate first - it seeds importants bit of information. | 1377 // Call delegate first - it seeds importants bit of information. |
1373 delegate_->OnLoadCompleted(); | 1378 delegate_->OnLoadCompleted(); |
1374 | 1379 |
1375 AddDevToolsExtensionsToClient(); | 1380 AddDevToolsExtensionsToClient(); |
1376 } | 1381 } |
OLD | NEW |