OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |