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

Side by Side Diff: chrome/browser/ui/search/other_device_menu_controller.cc

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 (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 "chrome/browser/ui/search/other_device_menu_controller.h" 5 #include "chrome/browser/ui/search/other_device_menu_controller.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "chrome/browser/sync/glue/session_model_associator.h" 9 #include "chrome/browser/sync/glue/session_model_associator.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // Create the view. 95 // Create the view.
96 view_.reset(OtherDeviceMenu::Create(&menu_model_)); 96 view_.reset(OtherDeviceMenu::Create(&menu_model_));
97 } 97 }
98 98
99 OtherDeviceMenuController::~OtherDeviceMenuController() { 99 OtherDeviceMenuController::~OtherDeviceMenuController() {
100 } 100 }
101 101
102 void OtherDeviceMenuController::ShowMenu() { 102 void OtherDeviceMenuController::ShowMenu() {
103 content::WebContents* web_contents = web_ui_->GetWebContents(); 103 content::WebContents* web_contents = web_ui_->GetWebContents();
104 Browser* browser = browser::FindBrowserWithWebContents(web_contents); 104 Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
105 if (!browser) 105 if (!browser)
106 return; 106 return;
107 107
108 view_->ShowMenu(browser->window()->GetNativeWindow(), location_); 108 view_->ShowMenu(browser->window()->GetNativeWindow(), location_);
109 } 109 }
110 110
111 bool OtherDeviceMenuController::IsCommandIdChecked(int command_id) const { 111 bool OtherDeviceMenuController::IsCommandIdChecked(int command_id) const {
112 return false; 112 return false;
113 } 113 }
114 114
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (tab_data_.size() >= kMaxTabsToShow) 193 if (tab_data_.size() >= kMaxTabsToShow)
194 return; 194 return;
195 } 195 }
196 } 196 }
197 } 197 }
198 } 198 }
199 199
200 // OtherDevice menu ---------------------------------------------------------- 200 // OtherDevice menu ----------------------------------------------------------
201 201
202 OtherDeviceMenu::~OtherDeviceMenu() {} 202 OtherDeviceMenu::~OtherDeviceMenu() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/pdf/pdf_tab_helper.cc ('k') | chrome/browser/ui/startup/default_browser_prompt_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698