| 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" |
| 11 #include "ui/views/window/frame_buttons.h" | 11 #include "ui/views/window/frame_buttons.h" |
| 12 | 12 |
| 13 class AvatarMenuButton; | 13 class AvatarMenuButton; |
| 14 class NewAvatarButton; | 14 class NewAvatarButton; |
| 15 class OpaqueBrowserFrameViewLayoutDelegate; | 15 class OpaqueBrowserFrameViewLayoutDelegate; |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 class ImageButton; | 18 class ImageButton; |
| 19 class Label; | 19 class Label; |
| 20 } | 20 } |
| 21 | 21 |
| 22 // Calculates the position of the widgets in the opaque browser frame view. | 22 // Calculates the position of the widgets in the opaque browser frame view. |
| 23 // | 23 // |
| 24 // This is separated out for testing reasons. OpaqueBrowserFrameView has tight | 24 // This is separated out for testing reasons. OpaqueBrowserFrameView has tight |
| 25 // dependencies with Browser and classes that depend on Browser. | 25 // dependencies with Browser and classes that depend on Browser. |
| 26 class OpaqueBrowserFrameViewLayout : public views::LayoutManager { | 26 class OpaqueBrowserFrameViewLayout : public views::LayoutManager { |
| 27 public: | 27 public: |
| 28 // Constants public for testing only. |
| 29 static const int kNonClientRestoredExtraThickness; |
| 30 static const int kFrameBorderThickness; |
| 31 static const int kTitlebarTopAndBottomEdgeThickness; |
| 32 static const int kIconLeftSpacing; |
| 33 static const int kIconTitleSpacing; |
| 34 static const int kCaptionSpacing; |
| 35 static const int kNewTabCaptionCondensedSpacing; |
| 36 |
| 28 explicit OpaqueBrowserFrameViewLayout( | 37 explicit OpaqueBrowserFrameViewLayout( |
| 29 OpaqueBrowserFrameViewLayoutDelegate* delegate); | 38 OpaqueBrowserFrameViewLayoutDelegate* delegate); |
| 30 ~OpaqueBrowserFrameViewLayout() override; | 39 ~OpaqueBrowserFrameViewLayout() override; |
| 31 | 40 |
| 32 // Whether we should add the (minimize,maximize,close) buttons. This should be | 41 // Whether we should add the (minimize,maximize,close) buttons. This should be |
| 33 // true if the buttons could be shown at any time in this session (see | 42 // true if the buttons could be shown at any time in this session (see |
| 34 // OpaqueBrowserFrameViewLayoutDelegate::ShouldShowCaptionButtons for whether | 43 // OpaqueBrowserFrameViewLayoutDelegate::ShouldShowCaptionButtons for whether |
| 35 // they are currently visible). | 44 // they are currently visible). |
| 36 static bool ShouldAddDefaultCaptionButtons(); | 45 static bool ShouldAddDefaultCaptionButtons(); |
| 37 | 46 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 AvatarMenuButton* avatar_button_; | 194 AvatarMenuButton* avatar_button_; |
| 186 views::View* new_avatar_button_; | 195 views::View* new_avatar_button_; |
| 187 | 196 |
| 188 std::vector<views::FrameButton> leading_buttons_; | 197 std::vector<views::FrameButton> leading_buttons_; |
| 189 std::vector<views::FrameButton> trailing_buttons_; | 198 std::vector<views::FrameButton> trailing_buttons_; |
| 190 | 199 |
| 191 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameViewLayout); | 200 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameViewLayout); |
| 192 }; | 201 }; |
| 193 | 202 |
| 194 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ | 203 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ |
| OLD | NEW |