| 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/profiles/new_avatar_button.h" | 8 #include "chrome/browser/ui/views/profiles/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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Returns the location icon, if this frame has any. | 59 // Returns the location icon, if this frame has any. |
| 60 virtual views::View* GetLocationIconView() const; | 60 virtual views::View* GetLocationIconView() const; |
| 61 | 61 |
| 62 // Overriden from views::View. | 62 // Overriden from views::View. |
| 63 void VisibilityChanged(views::View* starting_from, bool is_visible) override; | 63 void VisibilityChanged(views::View* starting_from, bool is_visible) override; |
| 64 | 64 |
| 65 protected: | 65 protected: |
| 66 BrowserView* browser_view() const { return browser_view_; } | 66 BrowserView* browser_view() const { return browser_view_; } |
| 67 BrowserFrame* frame() const { return frame_; } | 67 BrowserFrame* frame() const { return frame_; } |
| 68 | 68 |
| 69 // Updates the avatar button using the old or new UI based on the BrowserView |
| 70 // type, and the presence of the --enable-new-avatar-menu flag. Calls either |
| 71 // UpdateAvatarInfo() or UpdateNewStyleAvatarInfo() accordingly. |
| 72 void UpdateAvatar(views::ButtonListener* listener, |
| 73 const NewAvatarButton::AvatarButtonStyle style); |
| 74 |
| 69 // Updates the title and icon of the avatar button. | 75 // Updates the title and icon of the avatar button. |
| 70 void UpdateAvatarInfo(); | 76 void UpdateAvatarInfo(); |
| 71 | 77 |
| 72 // Updates the title of the avatar button displayed in the caption area. | 78 // Updates the title of the avatar button displayed in the caption area. |
| 73 // The button uses |style| to match the browser window style and notifies | 79 // The button uses |style| to match the browser window style and notifies |
| 74 // |listener| when it is clicked. | 80 // |listener| when it is clicked. |
| 75 void UpdateNewStyleAvatarInfo(views::ButtonListener* listener, | 81 void UpdateNewStyleAvatarInfo(views::ButtonListener* listener, |
| 76 const NewAvatarButton::AvatarButtonStyle style); | 82 const NewAvatarButton::AvatarButtonStyle style); |
| 77 | 83 |
| 78 private: | 84 private: |
| (...skipping 29 matching lines...) Expand all Loading... |
| 108 | 114 |
| 109 namespace chrome { | 115 namespace chrome { |
| 110 | 116 |
| 111 // Provided by a browser_non_client_frame_view_factory_*.cc implementation | 117 // Provided by a browser_non_client_frame_view_factory_*.cc implementation |
| 112 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( | 118 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( |
| 113 BrowserFrame* frame, BrowserView* browser_view); | 119 BrowserFrame* frame, BrowserView* browser_view); |
| 114 | 120 |
| 115 } // namespace chrome | 121 } // namespace chrome |
| 116 | 122 |
| 117 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ | 123 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
| OLD | NEW |