| 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 <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 } | 755 } |
| 756 | 756 |
| 757 void DevToolsUIBindings::PerformActionOnRemotePage(const std::string& page_id, | 757 void DevToolsUIBindings::PerformActionOnRemotePage(const std::string& page_id, |
| 758 const std::string& action) { | 758 const std::string& action) { |
| 759 if (!remote_targets_handler_) | 759 if (!remote_targets_handler_) |
| 760 return; | 760 return; |
| 761 DevToolsTargetImpl* target = remote_targets_handler_->GetTarget(page_id); | 761 DevToolsTargetImpl* target = remote_targets_handler_->GetTarget(page_id); |
| 762 if (!target) | 762 if (!target) |
| 763 return; | 763 return; |
| 764 if (action == kRemotePageActionInspect) | 764 if (action == kRemotePageActionInspect) |
| 765 target->Inspect(profile_); | 765 target->GetAgentHost()->Inspect(); |
| 766 if (action == kRemotePageActionReload) | 766 if (action == kRemotePageActionReload) |
| 767 target->Reload(); | 767 target->GetAgentHost()->Reload(); |
| 768 if (action == kRemotePageActionActivate) | 768 if (action == kRemotePageActionActivate) |
| 769 target->Activate(); | 769 target->GetAgentHost()->Activate(); |
| 770 if (action == kRemotePageActionClose) | 770 if (action == kRemotePageActionClose) |
| 771 target->Close(); | 771 target->GetAgentHost()->Close(); |
| 772 } | 772 } |
| 773 | 773 |
| 774 void DevToolsUIBindings::OpenRemotePage(const std::string& browser_id, | 774 void DevToolsUIBindings::OpenRemotePage(const std::string& browser_id, |
| 775 const std::string& url) { | 775 const std::string& url) { |
| 776 if (!remote_targets_handler_) | 776 if (!remote_targets_handler_) |
| 777 return; | 777 return; |
| 778 remote_targets_handler_->Open(browser_id, url); | 778 remote_targets_handler_->Open(browser_id, url); |
| 779 } | 779 } |
| 780 | 780 |
| 781 void DevToolsUIBindings::GetPreferences(const DispatchCallback& callback) { | 781 void DevToolsUIBindings::GetPreferences(const DispatchCallback& callback) { |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 void DevToolsUIBindings::FrontendLoaded() { | 1099 void DevToolsUIBindings::FrontendLoaded() { |
| 1100 if (frontend_loaded_) | 1100 if (frontend_loaded_) |
| 1101 return; | 1101 return; |
| 1102 frontend_loaded_ = true; | 1102 frontend_loaded_ = true; |
| 1103 | 1103 |
| 1104 // Call delegate first - it seeds importants bit of information. | 1104 // Call delegate first - it seeds importants bit of information. |
| 1105 delegate_->OnLoadCompleted(); | 1105 delegate_->OnLoadCompleted(); |
| 1106 | 1106 |
| 1107 AddDevToolsExtensionsToClient(); | 1107 AddDevToolsExtensionsToClient(); |
| 1108 } | 1108 } |
| OLD | NEW |