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

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

Issue 553243002: Track the active ExtensionKeybindingRegistry and make it available to EventRewriter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 6 years, 3 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 return (translate_icon_view && translate_icon_view->visible()) ? 310 return (translate_icon_view && translate_icon_view->visible()) ?
311 translate_icon_view : app_menu_; 311 translate_icon_view : app_menu_;
312 } 312 }
313 313
314 void ToolbarView::ExecuteExtensionCommand( 314 void ToolbarView::ExecuteExtensionCommand(
315 const extensions::Extension* extension, 315 const extensions::Extension* extension,
316 const extensions::Command& command) { 316 const extensions::Command& command) {
317 browser_actions_->ExecuteExtensionCommand(extension, command); 317 browser_actions_->ExecuteExtensionCommand(extension, command);
318 } 318 }
319 319
320 bool ToolbarView::IsExtensionCommandRegistered(
321 const ui::Accelerator& accelerator) {
322 return browser_actions_->IsExtensionCommandRegistered(accelerator);
323 }
324
320 void ToolbarView::ShowAppMenu(bool for_drop) { 325 void ToolbarView::ShowAppMenu(bool for_drop) {
321 if (wrench_menu_.get() && wrench_menu_->IsShowing()) 326 if (wrench_menu_.get() && wrench_menu_->IsShowing())
322 return; 327 return;
323 328
324 if (keyboard::KeyboardController::GetInstance() && 329 if (keyboard::KeyboardController::GetInstance() &&
325 keyboard::KeyboardController::GetInstance()->keyboard_visible()) { 330 keyboard::KeyboardController::GetInstance()->keyboard_visible()) {
326 keyboard::KeyboardController::GetInstance()->HideKeyboard( 331 keyboard::KeyboardController::GetInstance()->HideKeyboard(
327 keyboard::KeyboardController::HIDE_REASON_AUTOMATIC); 332 keyboard::KeyboardController::HIDE_REASON_AUTOMATIC);
328 } 333 }
329 334
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 771
767 void ToolbarView::OnShowHomeButtonChanged() { 772 void ToolbarView::OnShowHomeButtonChanged() {
768 Layout(); 773 Layout();
769 SchedulePaint(); 774 SchedulePaint();
770 } 775 }
771 776
772 int ToolbarView::content_shadow_height() const { 777 int ToolbarView::content_shadow_height() const {
773 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? 778 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ?
774 kContentShadowHeightAsh : kContentShadowHeight; 779 kContentShadowHeightAsh : kContentShadowHeight;
775 } 780 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698