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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 431173002: Create ExtensionActionView class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge conflict Created 6 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/views/toolbar/toolbar_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 browser_actions_->ExecuteExtensionCommand(extension, command); 325 browser_actions_->ExecuteExtensionCommand(extension, command);
326 } 326 }
327 327
328 void ToolbarView::ShowPageActionPopup(const extensions::Extension* extension) { 328 void ToolbarView::ShowPageActionPopup(const extensions::Extension* extension) {
329 extensions::ExtensionActionManager* extension_manager = 329 extensions::ExtensionActionManager* extension_manager =
330 extensions::ExtensionActionManager::Get(browser_->profile()); 330 extensions::ExtensionActionManager::Get(browser_->profile());
331 ExtensionAction* extension_action = 331 ExtensionAction* extension_action =
332 extension_manager->GetPageAction(*extension); 332 extension_manager->GetPageAction(*extension);
333 if (extension_action) { 333 if (extension_action) {
334 location_bar_->GetPageActionView(extension_action)->image_view()-> 334 location_bar_->GetPageActionView(extension_action)->image_view()->
335 ExecuteAction(ExtensionPopup::SHOW); 335 view_controller()->ExecuteAction(ExtensionPopup::SHOW, false);
336 } 336 }
337 } 337 }
338 338
339 void ToolbarView::ShowBrowserActionPopup( 339 void ToolbarView::ShowBrowserActionPopup(
340 const extensions::Extension* extension) { 340 const extensions::Extension* extension) {
341 browser_actions_->ShowPopupForExtension(extension, true, false); 341 browser_actions_->ShowPopupForExtension(extension, true, false);
342 } 342 }
343 343
344 void ToolbarView::ShowAppMenu(bool for_drop) { 344 void ToolbarView::ShowAppMenu(bool for_drop) {
345 if (wrench_menu_.get() && wrench_menu_->IsShowing()) 345 if (wrench_menu_.get() && wrench_menu_->IsShowing())
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 789
790 void ToolbarView::OnShowHomeButtonChanged() { 790 void ToolbarView::OnShowHomeButtonChanged() {
791 Layout(); 791 Layout();
792 SchedulePaint(); 792 SchedulePaint();
793 } 793 }
794 794
795 int ToolbarView::content_shadow_height() const { 795 int ToolbarView::content_shadow_height() const {
796 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? 796 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ?
797 kContentShadowHeightAsh : kContentShadowHeight; 797 kContentShadowHeightAsh : kContentShadowHeight;
798 } 798 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698