OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/frame/opaque_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
15 #include "chrome/browser/profiles/profiles_state.h" | 15 #include "chrome/browser/profiles/profiles_state.h" |
16 #include "chrome/browser/themes/theme_properties.h" | 16 #include "chrome/browser/themes/theme_properties.h" |
17 #include "chrome/browser/ui/views/avatar_label.h" | 17 #include "chrome/browser/ui/views/avatar_label.h" |
18 #include "chrome/browser/ui/views/avatar_menu_button.h" | 18 #include "chrome/browser/ui/views/avatar_menu_button.h" |
19 #include "chrome/browser/ui/views/frame/browser_frame.h" | 19 #include "chrome/browser/ui/views/frame/browser_frame.h" |
20 #include "chrome/browser/ui/views/frame/browser_view.h" | 20 #include "chrome/browser/ui/views/frame/browser_view.h" |
21 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h" | 21 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h" |
22 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_speci
fic.h" | 22 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_speci
fic.h" |
23 #include "chrome/browser/ui/views/new_avatar_button.h" | 23 #include "chrome/browser/ui/views/new_avatar_button.h" |
24 #include "chrome/browser/ui/views/tab_icon_view.h" | 24 #include "chrome/browser/ui/views/tab_icon_view.h" |
25 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 25 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
26 #include "chrome/browser/ui/views/toolbar_view.h" | 26 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
28 #include "chrome/common/pref_names.h" | 28 #include "chrome/common/pref_names.h" |
29 #include "content/public/browser/notification_service.h" | 29 #include "content/public/browser/notification_service.h" |
30 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
31 #include "grit/chromium_strings.h" | 31 #include "grit/chromium_strings.h" |
32 #include "grit/generated_resources.h" | 32 #include "grit/generated_resources.h" |
33 #include "grit/theme_resources.h" | 33 #include "grit/theme_resources.h" |
34 #include "grit/ui_resources.h" | 34 #include "grit/ui_resources.h" |
35 #include "ui/base/accessibility/accessible_view_state.h" | 35 #include "ui/base/accessibility/accessible_view_state.h" |
36 #include "ui/base/hit_test.h" | 36 #include "ui/base/hit_test.h" |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 | 867 |
868 int OpaqueBrowserFrameView::GetTopAreaHeight() const { | 868 int OpaqueBrowserFrameView::GetTopAreaHeight() const { |
869 gfx::ImageSkia* frame_image = GetFrameImage(); | 869 gfx::ImageSkia* frame_image = GetFrameImage(); |
870 int top_area_height = frame_image->height(); | 870 int top_area_height = frame_image->height(); |
871 if (browser_view()->IsTabStripVisible()) { | 871 if (browser_view()->IsTabStripVisible()) { |
872 top_area_height = std::max(top_area_height, | 872 top_area_height = std::max(top_area_height, |
873 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); | 873 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); |
874 } | 874 } |
875 return top_area_height; | 875 return top_area_height; |
876 } | 876 } |
OLD | NEW |