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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 | 805 |
806 void DevToolsUIBindings::PerformActionOnRemotePage(const std::string& page_id, | 806 void DevToolsUIBindings::PerformActionOnRemotePage(const std::string& page_id, |
807 const std::string& action) { | 807 const std::string& action) { |
808 if (!remote_targets_handler_) | 808 if (!remote_targets_handler_) |
809 return; | 809 return; |
810 scoped_refptr<content::DevToolsAgentHost> host = | 810 scoped_refptr<content::DevToolsAgentHost> host = |
811 remote_targets_handler_->GetTarget(page_id); | 811 remote_targets_handler_->GetTarget(page_id); |
812 if (!host) | 812 if (!host) |
813 return; | 813 return; |
814 if (action == kRemotePageActionInspect) | 814 if (action == kRemotePageActionInspect) |
815 host->Inspect(); | 815 host->Inspect(profile()); |
816 if (action == kRemotePageActionReload) | 816 if (action == kRemotePageActionReload) |
817 host->Reload(); | 817 host->Reload(); |
818 if (action == kRemotePageActionActivate) | 818 if (action == kRemotePageActionActivate) |
819 host->Activate(); | 819 host->Activate(); |
820 if (action == kRemotePageActionClose) | 820 if (action == kRemotePageActionClose) |
821 host->Close(); | 821 host->Close(); |
822 } | 822 } |
823 | 823 |
824 void DevToolsUIBindings::OpenRemotePage(const std::string& browser_id, | 824 void DevToolsUIBindings::OpenRemotePage(const std::string& browser_id, |
825 const std::string& url) { | 825 const std::string& url) { |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 void DevToolsUIBindings::FrontendLoaded() { | 1149 void DevToolsUIBindings::FrontendLoaded() { |
1150 if (frontend_loaded_) | 1150 if (frontend_loaded_) |
1151 return; | 1151 return; |
1152 frontend_loaded_ = true; | 1152 frontend_loaded_ = true; |
1153 | 1153 |
1154 // Call delegate first - it seeds importants bit of information. | 1154 // Call delegate first - it seeds importants bit of information. |
1155 delegate_->OnLoadCompleted(); | 1155 delegate_->OnLoadCompleted(); |
1156 | 1156 |
1157 AddDevToolsExtensionsToClient(); | 1157 AddDevToolsExtensionsToClient(); |
1158 } | 1158 } |
OLD | NEW |