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

Side by Side Diff: chrome/browser/ui/toolbar/media_router_contextual_menu.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
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/media_router_mojo_impl.h" 10 #include "chrome/browser/media/router/media_router_mojo_impl.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/singleton_tabs.h" 13 #include "chrome/browser/ui/singleton_tabs.h"
14 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h" 14 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
15 #include "chrome/browser/ui/toolbar/media_router_contextual_menu.h" 15 #include "chrome/browser/ui/toolbar/media_router_contextual_menu.h"
16 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" 16 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h"
17 #include "chrome/grit/chromium_strings.h" 17 #include "chrome/grit/chromium_strings.h"
18 #include "chrome/grit/generated_resources.h" 18 #include "chrome/grit/generated_resources.h"
19 #include "extensions/common/constants.h" 19 #include "extensions/common/constants.h"
20 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
21 #include "ui/base/models/menu_model_delegate.h" 21 #include "ui/base/models/menu_model_delegate.h"
22 22
23 #if defined(GOOGLE_CHROME_BUILD) 23 #if defined(GOOGLE_CHROME_BUILD)
24 #include "base/prefs/pref_service.h"
25 #include "chrome/browser/signin/signin_manager_factory.h" 24 #include "chrome/browser/signin/signin_manager_factory.h"
26 #include "chrome/browser/sync/profile_sync_service_factory.h" 25 #include "chrome/browser/sync/profile_sync_service_factory.h"
27 #include "chrome/common/pref_names.h" 26 #include "chrome/common/pref_names.h"
28 #include "components/browser_sync/browser/profile_sync_service.h" 27 #include "components/browser_sync/browser/profile_sync_service.h"
28 #include "components/prefs/pref_service.h"
29 #include "components/signin/core/browser/signin_manager.h" 29 #include "components/signin/core/browser/signin_manager.h"
30 #endif // defined(GOOGLE_CHROME_BUILD) 30 #endif // defined(GOOGLE_CHROME_BUILD)
31 31
32 MediaRouterContextualMenu::MediaRouterContextualMenu(Browser* browser) 32 MediaRouterContextualMenu::MediaRouterContextualMenu(Browser* browser)
33 : browser_(browser), 33 : browser_(browser),
34 menu_model_(this) { 34 menu_model_(this) {
35 menu_model_.AddItemWithStringId(IDC_MEDIA_ROUTER_ABOUT, 35 menu_model_.AddItemWithStringId(IDC_MEDIA_ROUTER_ABOUT,
36 IDS_MEDIA_ROUTER_ABOUT); 36 IDS_MEDIA_ROUTER_ABOUT);
37 menu_model_.AddSeparator(ui::NORMAL_SEPARATOR); 37 menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
38 menu_model_.AddItemWithStringId(IDC_MEDIA_ROUTER_LEARN_MORE, 38 menu_model_.AddItemWithStringId(IDC_MEDIA_ROUTER_LEARN_MORE,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 std::string(url::kStandardSchemeSeparator) + 150 std::string(url::kStandardSchemeSeparator) +
151 media_router->media_route_provider_extension_id() + 151 media_router->media_route_provider_extension_id() +
152 "/feedback.html"); 152 "/feedback.html");
153 chrome::ShowSingletonTab(browser_, GURL(feedback_url)); 153 chrome::ShowSingletonTab(browser_, GURL(feedback_url));
154 } 154 }
155 155
156 void MediaRouterContextualMenu::RemoveMediaRouterComponentAction() { 156 void MediaRouterContextualMenu::RemoveMediaRouterComponentAction() {
157 ToolbarActionsModel::Get(browser_->profile())->component_migration_helper() 157 ToolbarActionsModel::Get(browser_->profile())->component_migration_helper()
158 ->OnActionRemoved(ComponentToolbarActionsFactory::kMediaRouterActionId); 158 ->OnActionRemoved(ComponentToolbarActionsFactory::kMediaRouterActionId);
159 } 159 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698