| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 browser_actions_->extension_keybinding_registry()) { | 288 browser_actions_->extension_keybinding_registry()) { |
| 289 registry->set_registry_for_active_window(NULL); | 289 registry->set_registry_for_active_window(NULL); |
| 290 } | 290 } |
| 291 } | 291 } |
| 292 } | 292 } |
| 293 | 293 |
| 294 void ToolbarView::Update(WebContents* tab) { | 294 void ToolbarView::Update(WebContents* tab) { |
| 295 if (location_bar_) | 295 if (location_bar_) |
| 296 location_bar_->Update(tab); | 296 location_bar_->Update(tab); |
| 297 if (browser_actions_) | 297 if (browser_actions_) |
| 298 browser_actions_->RefreshToolbarActionViews(); | 298 browser_actions_->RefreshBrowserActionViews(); |
| 299 if (reload_) | 299 if (reload_) |
| 300 reload_->set_menu_enabled(chrome::IsDebuggerAttachedToCurrentTab(browser_)); | 300 reload_->set_menu_enabled(chrome::IsDebuggerAttachedToCurrentTab(browser_)); |
| 301 } | 301 } |
| 302 | 302 |
| 303 void ToolbarView::SetPaneFocusAndFocusAppMenu() { | 303 void ToolbarView::SetPaneFocusAndFocusAppMenu() { |
| 304 SetPaneFocus(app_menu_); | 304 SetPaneFocus(app_menu_); |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool ToolbarView::IsAppMenuFocused() { | 307 bool ToolbarView::IsAppMenuFocused() { |
| 308 return app_menu_->HasFocus(); | 308 return app_menu_->HasFocus(); |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 | 782 |
| 783 void ToolbarView::OnShowHomeButtonChanged() { | 783 void ToolbarView::OnShowHomeButtonChanged() { |
| 784 Layout(); | 784 Layout(); |
| 785 SchedulePaint(); | 785 SchedulePaint(); |
| 786 } | 786 } |
| 787 | 787 |
| 788 int ToolbarView::content_shadow_height() const { | 788 int ToolbarView::content_shadow_height() const { |
| 789 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? | 789 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? |
| 790 kContentShadowHeightAsh : kContentShadowHeight; | 790 kContentShadowHeightAsh : kContentShadowHeight; |
| 791 } | 791 } |
| OLD | NEW |