| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/search/search_types.h" |
| 10 #include "ui/views/window/non_client_view.h" | 11 #include "ui/views/window/non_client_view.h" |
| 11 | 12 |
| 13 namespace gfx { |
| 14 class ImageSkia; |
| 15 } // namespace gfx |
| 16 |
| 12 class AvatarMenuButton; | 17 class AvatarMenuButton; |
| 13 class BrowserFrame; | 18 class BrowserFrame; |
| 14 class BrowserView; | 19 class BrowserView; |
| 15 | 20 |
| 16 // A specialization of the NonClientFrameView object that provides additional | 21 // A specialization of the NonClientFrameView object that provides additional |
| 17 // Browser-specific methods. | 22 // Browser-specific methods. |
| 18 class BrowserNonClientFrameView : public views::NonClientFrameView { | 23 class BrowserNonClientFrameView : public views::NonClientFrameView { |
| 19 public: | 24 public: |
| 20 BrowserNonClientFrameView(BrowserFrame* frame, BrowserView* browser_view); | 25 BrowserNonClientFrameView(BrowserFrame* frame, BrowserView* browser_view); |
| 21 virtual ~BrowserNonClientFrameView(); | 26 virtual ~BrowserNonClientFrameView(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 39 virtual void VisibilityChanged(views::View* starting_from, | 44 virtual void VisibilityChanged(views::View* starting_from, |
| 40 bool is_visible) OVERRIDE; | 45 bool is_visible) OVERRIDE; |
| 41 | 46 |
| 42 protected: | 47 protected: |
| 43 BrowserView* browser_view() const { return browser_view_; } | 48 BrowserView* browser_view() const { return browser_view_; } |
| 44 BrowserFrame* frame() const { return frame_; } | 49 BrowserFrame* frame() const { return frame_; } |
| 45 | 50 |
| 46 // Updates the title and icon of the avatar button. | 51 // Updates the title and icon of the avatar button. |
| 47 void UpdateAvatarInfo(); | 52 void UpdateAvatarInfo(); |
| 48 | 53 |
| 54 // Returns the toolbar background color. |
| 55 SkColor GetToolbarBackgroundColor(chrome::search::Mode::Type mode); |
| 56 |
| 57 // Returns the toolbar background image. |
| 58 gfx::ImageSkia* GetToolbarBackgroundImage(chrome::search::Mode::Type mode); |
| 59 |
| 49 private: | 60 private: |
| 50 // The frame that hosts this view. | 61 // The frame that hosts this view. |
| 51 BrowserFrame* frame_; | 62 BrowserFrame* frame_; |
| 52 | 63 |
| 53 // The BrowserView hosted within this View. | 64 // The BrowserView hosted within this View. |
| 54 BrowserView* browser_view_; | 65 BrowserView* browser_view_; |
| 55 | 66 |
| 56 // Menu button that displays that either the incognito icon or the profile | 67 // Menu button that displays that either the incognito icon or the profile |
| 57 // icon. May be NULL for some frame styles. | 68 // icon. May be NULL for some frame styles. |
| 58 scoped_ptr<AvatarMenuButton> avatar_button_; | 69 scoped_ptr<AvatarMenuButton> avatar_button_; |
| 59 }; | 70 }; |
| 60 | 71 |
| 61 namespace browser { | 72 namespace browser { |
| 62 | 73 |
| 63 // Provided by a browser_non_client_frame_view_factory_*.cc implementation | 74 // Provided by a browser_non_client_frame_view_factory_*.cc implementation |
| 64 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( | 75 BrowserNonClientFrameView* CreateBrowserNonClientFrameView( |
| 65 BrowserFrame* frame, BrowserView* browser_view); | 76 BrowserFrame* frame, BrowserView* browser_view); |
| 66 | 77 |
| 67 } // browser | 78 } // browser |
| 68 | 79 |
| 69 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ | 80 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_ |
| OLD | NEW |