| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/metrics/user_metrics.h" | 6 #include "base/metrics/user_metrics.h" |
| 7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
| 8 #include "chrome/browser/extensions/component_migration_helper.h" | 8 #include "chrome/browser/extensions/component_migration_helper.h" |
| 9 #include "chrome/browser/media/router/media_router_factory.h" | 9 #include "chrome/browser/media/router/media_router_factory.h" |
| 10 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h" | 10 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 SigninManagerBase* signin_manager = | 78 SigninManagerBase* signin_manager = |
| 79 SigninManagerFactory::GetForProfile(browser_->profile()); | 79 SigninManagerFactory::GetForProfile(browser_->profile()); |
| 80 return signin_manager && signin_manager->IsAuthenticated(); | 80 return signin_manager && signin_manager->IsAuthenticated(); |
| 81 } | 81 } |
| 82 #endif // defined(GOOGLE_CHROME_BUILD) | 82 #endif // defined(GOOGLE_CHROME_BUILD) |
| 83 return true; | 83 return true; |
| 84 } | 84 } |
| 85 | 85 |
| 86 bool MediaRouterContextualMenu::GetAcceleratorForCommandId( | 86 bool MediaRouterContextualMenu::GetAcceleratorForCommandId( |
| 87 int command_id, | 87 int command_id, |
| 88 ui::Accelerator* accelerator) { | 88 ui::Accelerator* accelerator) const { |
| 89 return false; | 89 return false; |
| 90 } | 90 } |
| 91 | 91 |
| 92 void MediaRouterContextualMenu::ExecuteCommand(int command_id, | 92 void MediaRouterContextualMenu::ExecuteCommand(int command_id, |
| 93 int event_flags) { | 93 int event_flags) { |
| 94 const char kAboutPageUrl[] = | 94 const char kAboutPageUrl[] = |
| 95 "https://www.google.com/chrome/devices/chromecast/"; | 95 "https://www.google.com/chrome/devices/chromecast/"; |
| 96 const char kCastHelpCenterPageUrl[] = | 96 const char kCastHelpCenterPageUrl[] = |
| 97 "https://support.google.com/chromecast/topic/3447927"; | 97 "https://support.google.com/chromecast/topic/3447927"; |
| 98 const char kCastLearnMorePageUrl[] = | 98 const char kCastLearnMorePageUrl[] = |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 std::string(url::kStandardSchemeSeparator) + | 154 std::string(url::kStandardSchemeSeparator) + |
| 155 media_router->media_route_provider_extension_id() + | 155 media_router->media_route_provider_extension_id() + |
| 156 "/feedback.html"); | 156 "/feedback.html"); |
| 157 chrome::ShowSingletonTab(browser_, GURL(feedback_url)); | 157 chrome::ShowSingletonTab(browser_, GURL(feedback_url)); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void MediaRouterContextualMenu::RemoveMediaRouterComponentAction() { | 160 void MediaRouterContextualMenu::RemoveMediaRouterComponentAction() { |
| 161 ToolbarActionsModel::Get(browser_->profile())->component_migration_helper() | 161 ToolbarActionsModel::Get(browser_->profile())->component_migration_helper() |
| 162 ->OnActionRemoved(ComponentToolbarActionsFactory::kMediaRouterActionId); | 162 ->OnActionRemoved(ComponentToolbarActionsFactory::kMediaRouterActionId); |
| 163 } | 163 } |
| OLD | NEW |