| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 void ChildPreferredSizeChanged(View* child) override; | 64 void ChildPreferredSizeChanged(View* child) override; |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 BrowserView* browser_view() const { return browser_view_; } | 67 BrowserView* browser_view() const { return browser_view_; } |
| 68 BrowserFrame* frame() const { return frame_; } | 68 BrowserFrame* frame() const { return frame_; } |
| 69 | 69 |
| 70 // Whether the frame should be painted with theming. |
| 71 // By default, tabbed browser windows are themed but popup and app windows are |
| 72 // not. |
| 73 virtual bool ShouldPaintAsThemed() const; |
| 74 |
| 75 // Compute aspects of the frame needed to paint the frame background. |
| 76 SkColor GetFrameColor() const; |
| 77 gfx::ImageSkia* GetFrameImage() const; |
| 78 gfx::ImageSkia* GetFrameOverlayImage() const; |
| 79 int GetTopAreaHeight() const; |
| 80 |
| 70 // Updates the avatar button using the old or new UI based on the BrowserView | 81 // Updates the avatar button using the old or new UI based on the BrowserView |
| 71 // type, and the presence of the --enable-new-avatar-menu flag. Calls either | 82 // type, and the presence of the --enable-new-avatar-menu flag. Calls either |
| 72 // UpdateAvatarInfo() or UpdateNewStyleAvatar() accordingly. | 83 // UpdateAvatarInfo() or UpdateNewStyleAvatar() accordingly. |
| 73 void UpdateAvatar(); | 84 void UpdateAvatar(); |
| 74 | 85 |
| 75 // Updates the title and icon of the old avatar button. | 86 // Updates the title and icon of the old avatar button. |
| 76 void UpdateAvatarInfo(); | 87 void UpdateAvatarInfo(); |
| 77 | 88 |
| 78 // Updates the avatar button displayed in the caption area by calling | 89 // Updates the avatar button displayed in the caption area by calling |
| 79 // UpdateNewStyleAvatarInfo() with an implementation specific |listener| | 90 // UpdateNewStyleAvatarInfo() with an implementation specific |listener| |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 130 |
| 120 namespace chrome { | 131 namespace chrome { |
| 121 | 132 |
| 122 // Provided by a browser_non_client_frame_view_factory_*.cc implementation | 133 // Provided by a browser_non_client_frame_view_factory_*.cc implementation |
| 123 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( | 134 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( |
| 124 BrowserFrame* frame, BrowserView* browser_view); | 135 BrowserFrame* frame, BrowserView* browser_view); |
| 125 | 136 |
| 126 } // namespace chrome | 137 } // namespace chrome |
| 127 | 138 |
| 128 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ | 139 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
| OLD | NEW |