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/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" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 /////////////////////////////////////////////////////////////////////////////// | 94 /////////////////////////////////////////////////////////////////////////////// |
95 // AppPanelBrowserFrameView, BrowserNonClientFrameView implementation: | 95 // AppPanelBrowserFrameView, BrowserNonClientFrameView implementation: |
96 | 96 |
97 gfx::Rect AppPanelBrowserFrameView::GetBoundsForTabStrip( | 97 gfx::Rect AppPanelBrowserFrameView::GetBoundsForTabStrip( |
98 views::View* tabstrip) const { | 98 views::View* tabstrip) const { |
99 // App panels never show a tab strip. | 99 // App panels never show a tab strip. |
100 NOTREACHED(); | 100 NOTREACHED(); |
101 return gfx::Rect(); | 101 return gfx::Rect(); |
102 } | 102 } |
103 | 103 |
104 int AppPanelBrowserFrameView::GetHorizontalTabStripVerticalOffset( | 104 BrowserNonClientFrameView::TabStripInsets |
105 bool restored) const { | 105 AppPanelBrowserFrameView::GetTabStripInsets(bool restored) const { |
106 // App panels are not themed and don't need this. | 106 // App panels are not themed and don't need this. |
107 return 0; | 107 return TabStripInsets(); |
108 } | 108 } |
109 | 109 |
110 void AppPanelBrowserFrameView::UpdateThrobber(bool running) { | 110 void AppPanelBrowserFrameView::UpdateThrobber(bool running) { |
111 window_icon_->Update(); | 111 window_icon_->Update(); |
112 } | 112 } |
113 | 113 |
114 gfx::Size AppPanelBrowserFrameView::GetMinimumSize() { | 114 gfx::Size AppPanelBrowserFrameView::GetMinimumSize() { |
115 gfx::Size min_size(browser_view()->GetMinimumSize()); | 115 gfx::Size min_size(browser_view()->GetMinimumSize()); |
116 int border_thickness = NonClientBorderThickness(); | 116 int border_thickness = NonClientBorderThickness(); |
117 min_size.Enlarge(2 * border_thickness, | 117 min_size.Enlarge(2 * border_thickness, |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 } | 504 } |
505 | 505 |
506 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, | 506 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, |
507 int height) const { | 507 int height) const { |
508 int top_height = NonClientTopBorderHeight(); | 508 int top_height = NonClientTopBorderHeight(); |
509 int border_thickness = NonClientBorderThickness(); | 509 int border_thickness = NonClientBorderThickness(); |
510 return gfx::Rect(border_thickness, top_height, | 510 return gfx::Rect(border_thickness, top_height, |
511 std::max(0, width - (2 * border_thickness)), | 511 std::max(0, width - (2 * border_thickness)), |
512 std::max(0, height - top_height - border_thickness)); | 512 std::max(0, height - top_height - border_thickness)); |
513 } | 513 } |
OLD | NEW |