| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_view.h" | 5 #include "chrome/browser/ui/views/toolbar_view.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/i18n/number_formatting.h" | 9 #include "base/i18n/number_formatting.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 325 |
| 326 bool ToolbarView::GetAcceleratorInfo(int id, ui::Accelerator* accel) { | 326 bool ToolbarView::GetAcceleratorInfo(int id, ui::Accelerator* accel) { |
| 327 return GetWidget()->GetAccelerator(id, accel); | 327 return GetWidget()->GetAccelerator(id, accel); |
| 328 } | 328 } |
| 329 | 329 |
| 330 //////////////////////////////////////////////////////////////////////////////// | 330 //////////////////////////////////////////////////////////////////////////////// |
| 331 // ToolbarView, views::MenuButtonListener implementation: | 331 // ToolbarView, views::MenuButtonListener implementation: |
| 332 | 332 |
| 333 void ToolbarView::OnMenuButtonClicked(views::View* source, | 333 void ToolbarView::OnMenuButtonClicked(views::View* source, |
| 334 const gfx::Point& point) { | 334 const gfx::Point& point) { |
| 335 TRACE_EVENT0("ui::views", "ToolbarView::OnMenuButtonClicked"); | 335 TRACE_EVENT0("views", "ToolbarView::OnMenuButtonClicked"); |
| 336 DCHECK_EQ(VIEW_ID_APP_MENU, source->id()); | 336 DCHECK_EQ(VIEW_ID_APP_MENU, source->id()); |
| 337 | 337 |
| 338 bool use_new_menu = false; | 338 bool use_new_menu = false; |
| 339 bool supports_new_separators = false; | 339 bool supports_new_separators = false; |
| 340 // TODO: remove this. | 340 // TODO: remove this. |
| 341 #if defined(USE_AURA) | 341 #if defined(USE_AURA) |
| 342 supports_new_separators = | 342 supports_new_separators = |
| 343 GetNativeTheme() == ui::NativeThemeAura::instance(); | 343 GetNativeTheme() == ui::NativeThemeAura::instance(); |
| 344 use_new_menu = supports_new_separators; | 344 use_new_menu = supports_new_separators; |
| 345 #endif | 345 #endif |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 | 811 |
| 812 void ToolbarView::OnShowHomeButtonChanged() { | 812 void ToolbarView::OnShowHomeButtonChanged() { |
| 813 Layout(); | 813 Layout(); |
| 814 SchedulePaint(); | 814 SchedulePaint(); |
| 815 } | 815 } |
| 816 | 816 |
| 817 int ToolbarView::content_shadow_height() const { | 817 int ToolbarView::content_shadow_height() const { |
| 818 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? | 818 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? |
| 819 kContentShadowHeightAsh : kContentShadowHeight; | 819 kContentShadowHeightAsh : kContentShadowHeight; |
| 820 } | 820 } |
| OLD | NEW |