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_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/ui/views/new_avatar_button.h" | 8 #include "chrome/browser/ui/views/new_avatar_button.h" |
| 9 #include "ui/views/window/non_client_view.h" | 9 #include "ui/views/window/non_client_view.h" |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 virtual int GetThemeBackgroundXInset() const = 0; | 52 virtual int GetThemeBackgroundXInset() const = 0; |
| 53 | 53 |
| 54 // Updates the throbber. | 54 // Updates the throbber. |
| 55 virtual void UpdateThrobber(bool running) = 0; | 55 virtual void UpdateThrobber(bool running) = 0; |
| 56 | 56 |
| 57 // Overriden from views::View. | 57 // Overriden from views::View. |
| 58 virtual void VisibilityChanged(views::View* starting_from, | 58 virtual void VisibilityChanged(views::View* starting_from, |
| 59 bool is_visible) OVERRIDE; | 59 bool is_visible) OVERRIDE; |
| 60 virtual void OnThemeChanged() OVERRIDE; | 60 virtual void OnThemeChanged() OVERRIDE; |
| 61 | 61 |
| 62 // Anchor and show the ProfileChooser bubble under the avatar button in | |
| 63 // the caption area. | |
| 64 void ShowProfileChooserViewBubble(); | |
|
sky
2013/11/05 15:56:12
On second thought. I think you should move this to
| |
| 65 | |
| 62 protected: | 66 protected: |
| 63 BrowserView* browser_view() const { return browser_view_; } | 67 BrowserView* browser_view() const { return browser_view_; } |
| 64 BrowserFrame* frame() const { return frame_; } | 68 BrowserFrame* frame() const { return frame_; } |
| 65 | 69 |
| 66 // Updates the title and icon of the avatar button. | 70 // Updates the title and icon of the avatar button. |
| 67 void UpdateAvatarInfo(); | 71 void UpdateAvatarInfo(); |
| 68 | 72 |
| 69 // Updates the title of the avatar button displayed in the caption area. | 73 // Updates the title of the avatar button displayed in the caption area. |
| 70 // The button uses |style| to match the browser window style and notifies | 74 // The button uses |style| to match the browser window style and notifies |
| 71 // |listener| when it is clicked. | 75 // |listener| when it is clicked. |
| 72 void UpdateNewStyleAvatarInfo(views::ButtonListener* listener, | 76 void UpdateNewStyleAvatarInfo(views::ButtonListener* listener, |
| 73 const NewAvatarButton::AvatarButtonStyle style); | 77 const NewAvatarButton::AvatarButtonStyle style); |
| 74 | 78 |
| 75 // Anchor and show the ProfileChooser bubble under the avatar button in | |
| 76 // the caption area. | |
| 77 void ShowProfileChooserViewBubble(); | |
| 78 | |
| 79 private: | 79 private: |
| 80 // The frame that hosts this view. | 80 // The frame that hosts this view. |
| 81 BrowserFrame* frame_; | 81 BrowserFrame* frame_; |
| 82 | 82 |
| 83 // The BrowserView hosted within this View. | 83 // The BrowserView hosted within this View. |
| 84 BrowserView* browser_view_; | 84 BrowserView* browser_view_; |
| 85 | 85 |
| 86 // Menu button that displays that either the incognito icon or the profile | 86 // Menu button that displays that either the incognito icon or the profile |
| 87 // icon. May be NULL for some frame styles. | 87 // icon. May be NULL for some frame styles. |
| 88 AvatarMenuButton* avatar_button_; | 88 AvatarMenuButton* avatar_button_; |
| 89 | 89 |
| 90 // Avatar label that is used for a managed user. | 90 // Avatar label that is used for a managed user. |
| 91 AvatarLabel* avatar_label_; | 91 AvatarLabel* avatar_label_; |
| 92 | 92 |
| 93 // Menu button that displays the name of the active or guest profile. | 93 // Menu button that displays the name of the active or guest profile. |
| 94 // May be NULL and will not be displayed for off the record profiles. | 94 // May be NULL and will not be displayed for off the record profiles. |
| 95 NewAvatarButton* new_avatar_button_; | 95 NewAvatarButton* new_avatar_button_; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 namespace chrome { | 98 namespace chrome { |
| 99 | 99 |
| 100 // Provided by a browser_non_client_frame_view_factory_*.cc implementation | 100 // Provided by a browser_non_client_frame_view_factory_*.cc implementation |
| 101 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( | 101 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( |
| 102 BrowserFrame* frame, BrowserView* browser_view); | 102 BrowserFrame* frame, BrowserView* browser_view); |
| 103 | 103 |
| 104 } // namespace chrome | 104 } // namespace chrome |
| 105 | 105 |
| 106 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ | 106 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
| OLD | NEW |