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

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_actions_model.h

Issue 1612203002: [Media Router] Adds a contextual menu item to remove the MR component action. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to pkasting@ comments 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
« no previous file with comments | « chrome/browser/ui/toolbar/media_router_contextual_menu.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 ToolbarActionsBar* bar); 158 ToolbarActionsBar* bar);
159 scoped_ptr<ToolbarActionViewController> CreateActionForItem( 159 scoped_ptr<ToolbarActionViewController> CreateActionForItem(
160 Browser* browser, 160 Browser* browser,
161 ToolbarActionsBar* bar, 161 ToolbarActionsBar* bar,
162 const ToolbarItem& item); 162 const ToolbarItem& item);
163 163
164 const std::vector<ToolbarItem>& toolbar_items() const { 164 const std::vector<ToolbarItem>& toolbar_items() const {
165 return is_highlighting() ? highlighted_items_ : toolbar_items_; 165 return is_highlighting() ? highlighted_items_ : toolbar_items_;
166 } 166 }
167 167
168 extensions::ComponentMigrationHelper* component_migration_helper() {
169 return component_migration_helper_.get();
170 }
171
168 bool is_highlighting() const { return highlight_type_ != HIGHLIGHT_NONE; } 172 bool is_highlighting() const { return highlight_type_ != HIGHLIGHT_NONE; }
169 HighlightType highlight_type() const { return highlight_type_; } 173 HighlightType highlight_type() const { return highlight_type_; }
170 bool highlighting_for_toolbar_redesign() const { 174 bool highlighting_for_toolbar_redesign() const {
171 return highlighting_for_toolbar_redesign_; 175 return highlighting_for_toolbar_redesign_;
172 } 176 }
173 177
174 void SetActionVisibility(const std::string& action_id, bool visible); 178 void SetActionVisibility(const std::string& action_id, bool visible);
175 179
176 // ComponentMigrationHelper::ComponentActionDelegate: 180 // ComponentMigrationHelper::ComponentActionDelegate:
177 void AddComponentAction(const std::string& action_id) override; 181 void AddComponentAction(const std::string& action_id) override;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 // For observing change of toolbar order preference by external entity (sync). 333 // For observing change of toolbar order preference by external entity (sync).
330 PrefChangeRegistrar pref_change_registrar_; 334 PrefChangeRegistrar pref_change_registrar_;
331 base::Closure pref_change_callback_; 335 base::Closure pref_change_callback_;
332 336
333 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; 337 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_;
334 338
335 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); 339 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel);
336 }; 340 };
337 341
338 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ 342 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/media_router_contextual_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698