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

Side by Side Diff: chrome/browser/debugger/devtools_window.cc

Issue 10407122: Get rid of the last RenderViewHostDelegate usage in chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 chrome::NOTIFICATION_TAB_CLOSING, 219 chrome::NOTIFICATION_TAB_CLOSING,
220 content::Source<NavigationController>( 220 content::Source<NavigationController>(
221 &tab_contents_->web_contents()->GetController())); 221 &tab_contents_->web_contents()->GetController()));
222 registrar_.Add( 222 registrar_.Add(
223 this, 223 this,
224 chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 224 chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
225 content::Source<ThemeService>( 225 content::Source<ThemeService>(
226 ThemeServiceFactory::GetForProfile(profile_))); 226 ThemeServiceFactory::GetForProfile(profile_)));
227 // There is no inspected_rvh in case of shared workers. 227 // There is no inspected_rvh in case of shared workers.
228 if (inspected_rvh) { 228 if (inspected_rvh) {
229 WebContents* tab = inspected_rvh->GetDelegate()->GetAsWebContents(); 229 WebContents* tab = WebContents::FromRenderViewHost(inspected_rvh);
230 if (tab) 230 if (tab)
231 inspected_tab_ = TabContentsWrapper::GetCurrentWrapperForContents(tab); 231 inspected_tab_ = TabContentsWrapper::GetCurrentWrapperForContents(tab);
232 } 232 }
233 } 233 }
234 234
235 DevToolsWindow::~DevToolsWindow() { 235 DevToolsWindow::~DevToolsWindow() {
236 DevToolsWindowList& instances = g_instances.Get(); 236 DevToolsWindowList& instances = g_instances.Get();
237 DevToolsWindowList::iterator it = std::find(instances.begin(), 237 DevToolsWindowList::iterator it = std::find(instances.begin(),
238 instances.end(), 238 instances.end(),
239 this); 239 this);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 CallClientFunction("InspectorFrontendAPI.appendedToURL", &url_value); 755 CallClientFunction("InspectorFrontendAPI.appendedToURL", &url_value);
756 } 756 }
757 757
758 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { 758 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() {
759 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) { 759 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) {
760 return inspected_tab_->web_contents()->GetDelegate()-> 760 return inspected_tab_->web_contents()->GetDelegate()->
761 GetJavaScriptDialogCreator(); 761 GetJavaScriptDialogCreator();
762 } 762 }
763 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); 763 return content::WebContentsDelegate::GetJavaScriptDialogCreator();
764 } 764 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698