Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/shell_observer.h" | 10 #include "ash/shell_observer.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 // ash::ShellObserver: | 67 // ash::ShellObserver: |
| 68 void OnMaximizeModeStarted() override; | 68 void OnMaximizeModeStarted() override; |
| 69 void OnMaximizeModeEnded() override; | 69 void OnMaximizeModeEnded() override; |
| 70 | 70 |
| 71 // TabIconViewModel: | 71 // TabIconViewModel: |
| 72 bool ShouldTabIconViewAnimate() const override; | 72 bool ShouldTabIconViewAnimate() const override; |
| 73 gfx::ImageSkia GetFaviconForTabIconView() override; | 73 gfx::ImageSkia GetFaviconForTabIconView() override; |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 // BrowserNonClientFrameView: | 76 // BrowserNonClientFrameView: |
| 77 void UpdateAvatar() override; | 77 void UpdateProfileIcons() override; |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, WindowHeader); | 80 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, WindowHeader); |
| 81 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, | 81 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, |
| 82 NonImmersiveFullscreen); | 82 NonImmersiveFullscreen); |
| 83 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, | 83 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, |
| 84 ImmersiveFullscreen); | 84 ImmersiveFullscreen); |
| 85 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, | 85 FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, |
| 86 ToggleMaximizeModeRelayout); | 86 ToggleMaximizeModeRelayout); |
| 87 FRIEND_TEST_ALL_PREFIXES(WebAppLeftHeaderViewTest, BackButton); | 87 FRIEND_TEST_ALL_PREFIXES(WebAppLeftHeaderViewTest, BackButton); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 107 // Returns true if the header should be painted so that it looks the same as | 107 // Returns true if the header should be painted so that it looks the same as |
| 108 // the header used for packaged apps. Packaged apps use a different color | 108 // the header used for packaged apps. Packaged apps use a different color |
| 109 // scheme than browser windows. | 109 // scheme than browser windows. |
| 110 bool UsePackagedAppHeaderStyle() const; | 110 bool UsePackagedAppHeaderStyle() const; |
| 111 | 111 |
| 112 // Returns true if the header should be painted with a WebApp header style. | 112 // Returns true if the header should be painted with a WebApp header style. |
| 113 // The WebApp header style has a back button and title along with the usual | 113 // The WebApp header style has a back button and title along with the usual |
| 114 // accoutrements. | 114 // accoutrements. |
| 115 bool UseWebAppHeaderStyle() const; | 115 bool UseWebAppHeaderStyle() const; |
| 116 | 116 |
| 117 // Layout the avatar button. | 117 // Layout the image that indicates incognito or teleported windows. |
|
Peter Kasting
2016/05/17 03:51:42
Nit: Seems like we ought not to need to explain ag
Evan Stade
2016/05/17 18:13:09
removed. This is an example where "ProfileIndicato
| |
| 118 void LayoutAvatar(); | 118 void LayoutProfileIndicator(); |
| 119 | 119 |
| 120 // Returns true if there is anything to paint. Some fullscreen windows do not | 120 // Returns true if there is anything to paint. Some fullscreen windows do not |
| 121 // need their frames painted. | 121 // need their frames painted. |
| 122 bool ShouldPaint() const; | 122 bool ShouldPaint() const; |
| 123 | 123 |
| 124 void PaintToolbarBackground(gfx::Canvas* canvas); | 124 void PaintToolbarBackground(gfx::Canvas* canvas); |
| 125 | 125 |
| 126 // View which contains the window controls. | 126 // View which contains the window controls. |
| 127 ash::FrameCaptionButtonContainerView* caption_button_container_; | 127 ash::FrameCaptionButtonContainerView* caption_button_container_; |
| 128 | 128 |
| 129 // The holder for the buttons on the left side of the header. This is included | 129 // The holder for the buttons on the left side of the header. This is included |
| 130 // for web app style frames, and includes a back button and location icon. | 130 // for web app style frames, and includes a back button and location icon. |
| 131 WebAppLeftHeaderView* web_app_left_header_view_; | 131 WebAppLeftHeaderView* web_app_left_header_view_; |
| 132 | 132 |
| 133 // For popups, the window icon. | 133 // For popups, the window icon. |
| 134 TabIconView* window_icon_; | 134 TabIconView* window_icon_; |
| 135 | 135 |
| 136 // Helper class for painting the header. | 136 // Helper class for painting the header. |
| 137 std::unique_ptr<ash::HeaderPainter> header_painter_; | 137 std::unique_ptr<ash::HeaderPainter> header_painter_; |
| 138 | 138 |
| 139 // Updates the hittest bounds overrides based on the window show type. | 139 // Updates the hittest bounds overrides based on the window show type. |
| 140 std::unique_ptr<ash::FrameBorderHitTestController> | 140 std::unique_ptr<ash::FrameBorderHitTestController> |
| 141 frame_border_hit_test_controller_; | 141 frame_border_hit_test_controller_; |
| 142 | 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAsh); | 143 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAsh); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ | 146 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ |
| OLD | NEW |