| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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() {} |
| OLD | NEW |