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

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: 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 extension_action_view()->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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 800
801 void ToolbarView::OnShowHomeButtonChanged() { 801 void ToolbarView::OnShowHomeButtonChanged() {
802 Layout(); 802 Layout();
803 SchedulePaint(); 803 SchedulePaint();
804 } 804 }
805 805
806 int ToolbarView::content_shadow_height() const { 806 int ToolbarView::content_shadow_height() const {
807 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? 807 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ?
808 kContentShadowHeightAsh : kContentShadowHeight; 808 kContentShadowHeightAsh : kContentShadowHeight;
809 } 809 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698