Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: chrome/browser/devtools/devtools_ui_bindings.cc

Issue 513673004: Manual devtools fixups for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 extensions::APIPermission::kExperimental))); 786 extensions::APIPermission::kExperimental)));
787 results.Append(extension_info); 787 results.Append(extension_info);
788 } 788 }
789 CallClientFunction("WebInspector.addExtensions", &results, NULL, NULL); 789 CallClientFunction("WebInspector.addExtensions", &results, NULL, NULL);
790 } 790 }
791 791
792 void DevToolsUIBindings::SetDelegate(Delegate* delegate) { 792 void DevToolsUIBindings::SetDelegate(Delegate* delegate) {
793 delegate_.reset(delegate); 793 delegate_.reset(delegate);
794 } 794 }
795 795
796 void DevToolsUIBindings::AttachTo(content::DevToolsAgentHost* agent_host) { 796 void DevToolsUIBindings::AttachTo(
797 const scoped_refptr<content::DevToolsAgentHost>& agent_host) {
797 if (agent_host_.get()) 798 if (agent_host_.get())
798 Detach(); 799 Detach();
799 agent_host_ = agent_host; 800 agent_host_ = agent_host;
800 agent_host_->AttachClient(this); 801 agent_host_->AttachClient(this);
801 } 802 }
802 803
803 void DevToolsUIBindings::Reattach() { 804 void DevToolsUIBindings::Reattach() {
804 DCHECK(agent_host_.get()); 805 DCHECK(agent_host_.get());
805 agent_host_->DetachClient(); 806 agent_host_->DetachClient();
806 agent_host_->AttachClient(this); 807 agent_host_->AttachClient(this);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 web_contents_->GetMainFrame()->ExecuteJavaScript(javascript); 841 web_contents_->GetMainFrame()->ExecuteJavaScript(javascript);
841 } 842 }
842 843
843 void DevToolsUIBindings::DocumentOnLoadCompletedInMainFrame() { 844 void DevToolsUIBindings::DocumentOnLoadCompletedInMainFrame() {
844 // Call delegate first - it seeds importants bit of information. 845 // Call delegate first - it seeds importants bit of information.
845 delegate_->OnLoadCompleted(); 846 delegate_->OnLoadCompleted();
846 847
847 UpdateTheme(); 848 UpdateTheme();
848 AddDevToolsExtensionsToClient(); 849 AddDevToolsExtensionsToClient();
849 } 850 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.h ('k') | chrome/browser/devtools/devtools_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698