| 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/i18n/number_formatting.h" | 10 #include "base/i18n/number_formatting.h" |
| 11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
| 14 #include "chrome/app/chrome_command_ids.h" | 14 #include "chrome/app/chrome_command_ids.h" |
| 15 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
| 16 #include "chrome/browser/command_updater.h" | 16 #include "chrome/browser/command_updater.h" |
| 17 #include "chrome/browser/extensions/extension_commands_global_registry.h" | 17 #include "chrome/browser/extensions/extension_commands_global_registry.h" |
| 18 #include "chrome/browser/extensions/extension_util.h" | 18 #include "chrome/browser/extensions/extension_util.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/browser/themes/theme_properties.h" | 20 #include "chrome/browser/themes/theme_properties.h" |
| 21 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
| 22 #include "chrome/browser/ui/browser_command_controller.h" | 22 #include "chrome/browser/ui/browser_command_controller.h" |
| 23 #include "chrome/browser/ui/browser_commands.h" | 23 #include "chrome/browser/ui/browser_commands.h" |
| 24 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" | 24 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" |
| 25 #include "chrome/browser/ui/browser_tabstrip.h" | 25 #include "chrome/browser/ui/browser_tabstrip.h" |
| 26 #include "chrome/browser/ui/browser_window.h" | 26 #include "chrome/browser/ui/browser_window.h" |
| 27 #include "chrome/browser/ui/global_error/global_error_service.h" | 27 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 28 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 28 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 29 #include "chrome/browser/ui/layout_constants.h" |
| 29 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 30 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 30 #include "chrome/browser/ui/view_ids.h" | 31 #include "chrome/browser/ui/view_ids.h" |
| 31 #include "chrome/browser/ui/views/autofill/save_card_icon_view.h" | 32 #include "chrome/browser/ui/views/autofill/save_card_icon_view.h" |
| 32 #include "chrome/browser/ui/views/extensions/extension_popup.h" | 33 #include "chrome/browser/ui/views/extensions/extension_popup.h" |
| 33 #include "chrome/browser/ui/views/frame/browser_view.h" | 34 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 34 #include "chrome/browser/ui/views/layout_constants.h" | |
| 35 #include "chrome/browser/ui/views/location_bar/page_action_image_view.h" | 35 #include "chrome/browser/ui/views/location_bar/page_action_image_view.h" |
| 36 #include "chrome/browser/ui/views/location_bar/page_action_with_badge_view.h" | 36 #include "chrome/browser/ui/views/location_bar/page_action_with_badge_view.h" |
| 37 #include "chrome/browser/ui/views/location_bar/star_view.h" | 37 #include "chrome/browser/ui/views/location_bar/star_view.h" |
| 38 #include "chrome/browser/ui/views/outdated_upgrade_bubble_view.h" | 38 #include "chrome/browser/ui/views/outdated_upgrade_bubble_view.h" |
| 39 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" | 39 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" |
| 40 #include "chrome/browser/ui/views/toolbar/back_button.h" | 40 #include "chrome/browser/ui/views/toolbar/back_button.h" |
| 41 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" | 41 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" |
| 42 #include "chrome/browser/ui/views/toolbar/home_button.h" | 42 #include "chrome/browser/ui/views/toolbar/home_button.h" |
| 43 #include "chrome/browser/ui/views/toolbar/reload_button.h" | 43 #include "chrome/browser/ui/views/toolbar/reload_button.h" |
| 44 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" | 44 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 void ToolbarView::OnShowHomeButtonChanged() { | 818 void ToolbarView::OnShowHomeButtonChanged() { |
| 819 Layout(); | 819 Layout(); |
| 820 SchedulePaint(); | 820 SchedulePaint(); |
| 821 } | 821 } |
| 822 | 822 |
| 823 int ToolbarView::content_shadow_height() const { | 823 int ToolbarView::content_shadow_height() const { |
| 824 return GetLayoutConstant( | 824 return GetLayoutConstant( |
| 825 (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) ? | 825 (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) ? |
| 826 TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH : TOOLBAR_CONTENT_SHADOW_HEIGHT); | 826 TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH : TOOLBAR_CONTENT_SHADOW_HEIGHT); |
| 827 } | 827 } |
| OLD | NEW |