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

Side by Side Diff: content/shell/browser/shell_devtools_delegate.cc

Issue 442303002: DevTools: migrate DevTools APIs to use WebContents instead of RenderViewHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_devtools_delegate.h" 5 #include "content/shell/browser/shell_devtools_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 scoped_refptr<DevToolsAgentHost> agent_host_; 101 scoped_refptr<DevToolsAgentHost> agent_host_;
102 std::string id_; 102 std::string id_;
103 std::string title_; 103 std::string title_;
104 GURL url_; 104 GURL url_;
105 GURL favicon_url_; 105 GURL favicon_url_;
106 base::TimeTicks last_activity_time_; 106 base::TimeTicks last_activity_time_;
107 }; 107 };
108 108
109 Target::Target(WebContents* web_contents) { 109 Target::Target(WebContents* web_contents) {
110 agent_host_ = 110 agent_host_ =
111 DevToolsAgentHost::GetOrCreateFor(web_contents->GetRenderViewHost()); 111 DevToolsAgentHost::GetOrCreateFor(web_contents);
112 id_ = agent_host_->GetId(); 112 id_ = agent_host_->GetId();
113 title_ = base::UTF16ToUTF8(web_contents->GetTitle()); 113 title_ = base::UTF16ToUTF8(web_contents->GetTitle());
114 url_ = web_contents->GetURL(); 114 url_ = web_contents->GetURL();
115 content::NavigationController& controller = web_contents->GetController(); 115 content::NavigationController& controller = web_contents->GetController();
116 content::NavigationEntry* entry = controller.GetActiveEntry(); 116 content::NavigationEntry* entry = controller.GetActiveEntry();
117 if (entry != NULL && entry->GetURL().is_valid()) 117 if (entry != NULL && entry->GetURL().is_valid())
118 favicon_url_ = entry->GetFavicon().url; 118 favicon_url_ = entry->GetFavicon().url;
119 last_activity_time_ = web_contents->GetLastActiveTime(); 119 last_activity_time_ = web_contents->GetLastActiveTime();
120 } 120 }
121 121
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 scoped_ptr<net::StreamListenSocket> 212 scoped_ptr<net::StreamListenSocket>
213 ShellDevToolsDelegate::CreateSocketForTethering( 213 ShellDevToolsDelegate::CreateSocketForTethering(
214 net::StreamListenSocket::Delegate* delegate, 214 net::StreamListenSocket::Delegate* delegate,
215 std::string* name) { 215 std::string* name) {
216 return scoped_ptr<net::StreamListenSocket>(); 216 return scoped_ptr<net::StreamListenSocket>();
217 } 217 }
218 218
219 } // namespace content 219 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698