| 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 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" | 9 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" |
| 10 #include "ui/views/layout/layout_manager.h" | 10 #include "ui/views/layout/layout_manager.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // Constants used by OpaqueBrowserFrameView as well. | 28 // Constants used by OpaqueBrowserFrameView as well. |
| 29 static const int kContentEdgeShadowThickness; | 29 static const int kContentEdgeShadowThickness; |
| 30 | 30 |
| 31 // Constants public for testing only. | 31 // Constants public for testing only. |
| 32 static const int kNonClientRestoredExtraThickness; | 32 static const int kNonClientRestoredExtraThickness; |
| 33 static const int kFrameBorderThickness; | 33 static const int kFrameBorderThickness; |
| 34 static const int kTitlebarTopEdgeThickness; | 34 static const int kTitlebarTopEdgeThickness; |
| 35 static const int kIconLeftSpacing; | 35 static const int kIconLeftSpacing; |
| 36 static const int kIconTitleSpacing; | 36 static const int kIconTitleSpacing; |
| 37 static const int kCaptionSpacing; | 37 static const int kCaptionSpacing; |
| 38 static const int kCaptionButtonBottomPadding; |
| 38 static const int kNewTabCaptionCondensedSpacing; | 39 static const int kNewTabCaptionCondensedSpacing; |
| 39 | 40 |
| 40 explicit OpaqueBrowserFrameViewLayout( | 41 explicit OpaqueBrowserFrameViewLayout( |
| 41 OpaqueBrowserFrameViewLayoutDelegate* delegate); | 42 OpaqueBrowserFrameViewLayoutDelegate* delegate); |
| 42 ~OpaqueBrowserFrameViewLayout() override; | 43 ~OpaqueBrowserFrameViewLayout() override; |
| 43 | 44 |
| 44 // Whether we should add the (minimize,maximize,close) buttons. This should be | 45 // Whether we should add the (minimize,maximize,close) buttons. This should be |
| 45 // true if the buttons could be shown at any time in this session (see | 46 // true if the buttons could be shown at any time in this session (see |
| 46 // OpaqueBrowserFrameViewLayoutDelegate::ShouldShowCaptionButtons for whether | 47 // OpaqueBrowserFrameViewLayoutDelegate::ShouldShowCaptionButtons for whether |
| 47 // they are currently visible). | 48 // they are currently visible). |
| (...skipping 28 matching lines...) Expand all Loading... |
| 76 // frame, any title area, and any connected client edge. If |restored| is | 77 // frame, any title area, and any connected client edge. If |restored| is |
| 77 // true, acts as if the window is restored regardless of the real mode. | 78 // true, acts as if the window is restored regardless of the real mode. |
| 78 int NonClientTopBorderHeight(bool restored) const; | 79 int NonClientTopBorderHeight(bool restored) const; |
| 79 | 80 |
| 80 int GetTabStripInsetsTop(bool restored) const; | 81 int GetTabStripInsetsTop(bool restored) const; |
| 81 | 82 |
| 82 // Returns the y-coordinate of the caption buttons. If |restored| is true, | 83 // Returns the y-coordinate of the caption buttons. If |restored| is true, |
| 83 // acts as if the window is restored regardless of the real mode. | 84 // acts as if the window is restored regardless of the real mode. |
| 84 int CaptionButtonY(bool restored) const; | 85 int CaptionButtonY(bool restored) const; |
| 85 | 86 |
| 86 // Returns the thickness of the 3D edge along the bottom of the titlebar. If | 87 // Returns the thickness of the 3D edge along the top of the titlebar. If |
| 87 // |restored| is true, acts as if the window is restored regardless of the | 88 // |restored| is true, acts as if the window is restored regardless of the |
| 88 // real mode. | 89 // real mode. |
| 89 int TitlebarBottomThickness(bool restored) const; | 90 int TitlebarTopThickness(bool restored) const; |
| 90 | 91 |
| 91 // Returns the bounds of the titlebar icon (or where the icon would be if | 92 // Returns the bounds of the titlebar icon (or where the icon would be if |
| 92 // there was one). | 93 // there was one). |
| 93 gfx::Rect IconBounds() const; | 94 gfx::Rect IconBounds() const; |
| 94 | 95 |
| 95 // Returns the bounds of the client area for the specified view size. | 96 // Returns the bounds of the client area for the specified view size. |
| 96 gfx::Rect CalculateClientAreaBounds(int width, int height) const; | 97 gfx::Rect CalculateClientAreaBounds(int width, int height) const; |
| 97 | 98 |
| 98 void set_extra_caption_y(int extra_caption_y) { | 99 void set_extra_caption_y(int extra_caption_y) { |
| 99 extra_caption_y_ = extra_caption_y; | 100 extra_caption_y_ = extra_caption_y; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 AvatarMenuButton* avatar_button_; | 198 AvatarMenuButton* avatar_button_; |
| 198 views::View* new_avatar_button_; | 199 views::View* new_avatar_button_; |
| 199 | 200 |
| 200 std::vector<views::FrameButton> leading_buttons_; | 201 std::vector<views::FrameButton> leading_buttons_; |
| 201 std::vector<views::FrameButton> trailing_buttons_; | 202 std::vector<views::FrameButton> trailing_buttons_; |
| 202 | 203 |
| 203 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameViewLayout); | 204 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameViewLayout); |
| 204 }; | 205 }; |
| 205 | 206 |
| 206 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ | 207 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ |
| OLD | NEW |