| 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_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/profiles/profile_attributes_storage.h" | 8 #include "chrome/browser/profiles/profile_attributes_storage.h" |
| 9 #include "chrome/browser/ui/views/profiles/profile_indicator_icon.h" | 9 #include "chrome/browser/ui/views/profiles/profile_indicator_icon.h" |
| 10 #include "ui/views/window/non_client_view.h" | 10 #include "ui/views/window/non_client_view.h" |
| 11 | 11 |
| 12 class BrowserFrame; | 12 class BrowserFrame; |
| 13 class BrowserView; | 13 class BrowserView; |
| 14 | 14 |
| 15 // A specialization of the NonClientFrameView object that provides additional | 15 // A specialization of the NonClientFrameView object that provides additional |
| 16 // Browser-specific methods. | 16 // Browser-specific methods. |
| 17 class BrowserNonClientFrameView : public views::NonClientFrameView, | 17 class BrowserNonClientFrameView : public views::NonClientFrameView, |
| 18 public ProfileAttributesStorage::Observer { | 18 public ProfileAttributesStorage::Observer { |
| 19 public: | 19 public: |
| 20 // The padding on the left, right, and bottom of the avatar icon. |
| 21 static constexpr int kAvatarIconPadding = 4; |
| 22 |
| 20 BrowserNonClientFrameView(BrowserFrame* frame, BrowserView* browser_view); | 23 BrowserNonClientFrameView(BrowserFrame* frame, BrowserView* browser_view); |
| 21 ~BrowserNonClientFrameView() override; | 24 ~BrowserNonClientFrameView() override; |
| 22 | 25 |
| 23 BrowserView* browser_view() const { return browser_view_; } | 26 BrowserView* browser_view() const { return browser_view_; } |
| 24 BrowserFrame* frame() const { return frame_; } | 27 BrowserFrame* frame() const { return frame_; } |
| 25 | 28 |
| 26 // Called when BrowserView creates all it's child views. | 29 // Called when BrowserView creates all it's child views. |
| 27 virtual void OnBrowserViewInitViewsComplete(); | 30 virtual void OnBrowserViewInitViewsComplete(); |
| 28 | 31 |
| 29 // Retrieves the bounds, in non-client view coordinates within which the | 32 // Retrieves the bounds, in non-client view coordinates within which the |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 136 |
| 134 namespace chrome { | 137 namespace chrome { |
| 135 | 138 |
| 136 // Provided by a browser_non_client_frame_view_factory_*.cc implementation | 139 // Provided by a browser_non_client_frame_view_factory_*.cc implementation |
| 137 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( | 140 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( |
| 138 BrowserFrame* frame, BrowserView* browser_view); | 141 BrowserFrame* frame, BrowserView* browser_view); |
| 139 | 142 |
| 140 } // namespace chrome | 143 } // namespace chrome |
| 141 | 144 |
| 142 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ | 145 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
| OLD | NEW |