OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | |
9 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
10 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
12 #include "chrome/browser/themes/browser_theme_provider.h" | 11 #include "chrome/browser/themes/browser_theme_provider.h" |
13 #include "chrome/browser/ui/views/frame/browser_frame.h" | 12 #include "chrome/browser/ui/views/frame/browser_frame.h" |
14 #include "chrome/browser/ui/views/frame/browser_view.h" | 13 #include "chrome/browser/ui/views/frame/browser_view.h" |
15 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 14 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
16 #include "chrome/browser/ui/views/toolbar_view.h" | 15 #include "chrome/browser/ui/views/toolbar_view.h" |
17 #include "gfx/canvas_skia.h" | 16 #include "gfx/canvas_skia.h" |
18 #include "gfx/font.h" | 17 #include "gfx/font.h" |
19 #include "gfx/path.h" | 18 #include "gfx/path.h" |
20 #include "grit/app_resources.h" | 19 #include "grit/app_resources.h" |
21 #include "grit/chromium_strings.h" | 20 #include "grit/chromium_strings.h" |
22 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
23 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
| 23 #include "ui/base/resource/resource_bundle.h" |
24 #include "ui/base/theme_provider.h" | 24 #include "ui/base/theme_provider.h" |
25 #include "views/controls/button/image_button.h" | 25 #include "views/controls/button/image_button.h" |
26 #include "views/controls/image_view.h" | 26 #include "views/controls/image_view.h" |
27 #include "views/widget/root_view.h" | 27 #include "views/widget/root_view.h" |
28 #include "views/window/window.h" | 28 #include "views/window/window.h" |
29 #include "views/window/window_resources.h" | 29 #include "views/window/window_resources.h" |
30 #include "views/window/window_shape.h" | 30 #include "views/window/window_shape.h" |
31 | 31 |
32 #if defined(OS_LINUX) | 32 #if defined(OS_LINUX) |
33 #include "views/window/hit_test.h" | 33 #include "views/window/hit_test.h" |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 | 1063 |
1064 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width, | 1064 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width, |
1065 int height) const { | 1065 int height) const { |
1066 int top_height = NonClientTopBorderHeight(false, false); | 1066 int top_height = NonClientTopBorderHeight(false, false); |
1067 int border_thickness = NonClientBorderThickness(); | 1067 int border_thickness = NonClientBorderThickness(); |
1068 return gfx::Rect(border_thickness, top_height, | 1068 return gfx::Rect(border_thickness, top_height, |
1069 std::max(0, width - (2 * border_thickness)), | 1069 std::max(0, width - (2 * border_thickness)), |
1070 std::max(0, height - GetReservedHeight() - | 1070 std::max(0, height - GetReservedHeight() - |
1071 top_height - border_thickness)); | 1071 top_height - border_thickness)); |
1072 } | 1072 } |
OLD | NEW |