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

Unified Diff: chrome/browser/chromeos/dom_ui/internet_options_handler.cc

Issue 2819086: Removal of TabContentsDelegate::GetBrowser() interface method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/chromeos/tab_closeable_state_watcher_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/dom_ui/internet_options_handler.cc
===================================================================
--- chrome/browser/chromeos/dom_ui/internet_options_handler.cc (revision 55729)
+++ chrome/browser/chromeos/dom_ui/internet_options_handler.cc (working copy)
@@ -93,11 +93,9 @@
}
void InternetOptionsHandler::CreateModalPopup(views::WindowDelegate* view) {
- Browser* browser = NULL;
- TabContentsDelegate* delegate = dom_ui_->tab_contents()->delegate();
- if (delegate)
- browser = delegate->GetBrowser();
- DCHECK(browser);
+ // TODO(beng): This is an improper direct dependency on Browser. Route this
+ // through some sort of delegate.
+ Browser* browser = BrowserList::FindBrowserWithProfile(dom_ui_->GetProfile());
views::Window* window = views::Window::CreateChromeWindow(
browser->window()->GetNativeHandle(), gfx::Rect(), view);
window->SetIsAlwaysOnTop(true);
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/chromeos/tab_closeable_state_watcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698