| 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 "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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 // ToolbarView, views::MenuButtonListener implementation: | 407 // ToolbarView, views::MenuButtonListener implementation: |
| 408 | 408 |
| 409 void ToolbarView::OnMenuButtonClicked(views::View* source, | 409 void ToolbarView::OnMenuButtonClicked(views::View* source, |
| 410 const gfx::Point& point) { | 410 const gfx::Point& point) { |
| 411 TRACE_EVENT0("views", "ToolbarView::OnMenuButtonClicked"); | 411 TRACE_EVENT0("views", "ToolbarView::OnMenuButtonClicked"); |
| 412 DCHECK_EQ(VIEW_ID_APP_MENU, source->id()); | 412 DCHECK_EQ(VIEW_ID_APP_MENU, source->id()); |
| 413 | 413 |
| 414 bool use_new_menu = false; | 414 bool use_new_menu = false; |
| 415 bool supports_new_separators = false; | 415 bool supports_new_separators = false; |
| 416 // TODO: remove this. | 416 // TODO: remove this. |
| 417 #if defined(USE_AURA) | 417 #if defined(USE_AURA) && !(defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 418 supports_new_separators = | 418 supports_new_separators = |
| 419 GetNativeTheme() == ui::NativeThemeAura::instance(); | 419 GetNativeTheme() == ui::NativeThemeAura::instance(); |
| 420 use_new_menu = supports_new_separators; | 420 use_new_menu = supports_new_separators; |
| 421 #endif | 421 #endif |
| 422 #if defined(OS_WIN) | 422 #if defined(OS_WIN) |
| 423 use_new_menu = use_new_menu || ui::GetDisplayLayout() == ui::LAYOUT_TOUCH; | 423 use_new_menu = use_new_menu || ui::GetDisplayLayout() == ui::LAYOUT_TOUCH; |
| 424 #endif | 424 #endif |
| 425 | 425 |
| 426 wrench_menu_.reset(new WrenchMenu(browser_, use_new_menu, | 426 wrench_menu_.reset(new WrenchMenu(browser_, use_new_menu, |
| 427 supports_new_separators)); | 427 supports_new_separators)); |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 | 887 |
| 888 void ToolbarView::OnShowHomeButtonChanged() { | 888 void ToolbarView::OnShowHomeButtonChanged() { |
| 889 Layout(); | 889 Layout(); |
| 890 SchedulePaint(); | 890 SchedulePaint(); |
| 891 } | 891 } |
| 892 | 892 |
| 893 int ToolbarView::content_shadow_height() const { | 893 int ToolbarView::content_shadow_height() const { |
| 894 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? | 894 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? |
| 895 kContentShadowHeightAsh : kContentShadowHeight; | 895 kContentShadowHeightAsh : kContentShadowHeight; |
| 896 } | 896 } |
| OLD | NEW |