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/app_panel_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/app_panel_browser_frame_view.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/ui/views/frame/browser_frame.h" | 9 #include "chrome/browser/ui/views/frame/browser_frame.h" |
10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
11 #include "chrome/browser/ui/views/tab_icon_view.h" | 11 #include "chrome/browser/ui/views/tab_icon_view.h" |
12 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
13 #include "grit/chromium_strings.h" | 13 #include "grit/chromium_strings.h" |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
16 #include "grit/ui_resources.h" | 16 #include "grit/ui_resources.h" |
17 #include "ui/base/hit_test.h" | 17 #include "ui/base/hit_test.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 } | 507 } |
508 | 508 |
509 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, | 509 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, |
510 int height) const { | 510 int height) const { |
511 int top_height = NonClientTopBorderHeight(); | 511 int top_height = NonClientTopBorderHeight(); |
512 int border_thickness = NonClientBorderThickness(); | 512 int border_thickness = NonClientBorderThickness(); |
513 return gfx::Rect(border_thickness, top_height, | 513 return gfx::Rect(border_thickness, top_height, |
514 std::max(0, width - (2 * border_thickness)), | 514 std::max(0, width - (2 * border_thickness)), |
515 std::max(0, height - top_height - border_thickness)); | 515 std::max(0, height - top_height - border_thickness)); |
516 } | 516 } |
OLD | NEW |