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

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

Issue 1495653003: [Media Router] Check MediaRouterDialogControllerImpl only sets toolbar MediaRouterAction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per pkasting@'s comments. Created 5 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
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/toolbar/toolbar_actions_model.h" 5 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 // Create and add an ExtensionActionViewController for the extension. 182 // Create and add an ExtensionActionViewController for the extension.
183 result.reset(new ExtensionActionViewController( 183 result.reset(new ExtensionActionViewController(
184 extension, browser, 184 extension, browser,
185 extension_action_manager_->GetExtensionAction(*extension), bar)); 185 extension_action_manager_->GetExtensionAction(*extension), bar));
186 break; 186 break;
187 } 187 }
188 case COMPONENT_ACTION: { 188 case COMPONENT_ACTION: {
189 DCHECK(use_redesign_); 189 DCHECK(use_redesign_);
190 result = ComponentToolbarActionsFactory::GetInstance() 190 result = ComponentToolbarActionsFactory::GetInstance()
191 ->GetComponentToolbarActionForId(item.id, browser) 191 ->GetComponentToolbarActionForId(item.id, browser, bar)
192 .Pass(); 192 .Pass();
193 break; 193 break;
194 } 194 }
195 case UNKNOWN_ACTION: 195 case UNKNOWN_ACTION:
196 NOTREACHED(); // Should never have an UNKNOWN_ACTION in toolbar_items. 196 NOTREACHED(); // Should never have an UNKNOWN_ACTION in toolbar_items.
197 break; 197 break;
198 } 198 }
199 return result.Pass(); 199 return result.Pass();
200 } 200 }
201 201
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 return true; 773 return true;
774 } 774 }
775 } 775 }
776 return false; 776 return false;
777 } 777 }
778 778
779 const extensions::Extension* ToolbarActionsModel::GetExtensionById( 779 const extensions::Extension* ToolbarActionsModel::GetExtensionById(
780 const std::string& id) const { 780 const std::string& id) const {
781 return extension_registry_->enabled_extensions().GetByID(id); 781 return extension_registry_->enabled_extensions().GetByID(id);
782 } 782 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698