OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AURA_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_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/views/frame/browser_non_client_frame_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 int NonClientHitTestImpl(const gfx::Point& point); | 35 int NonClientHitTestImpl(const gfx::Point& point); |
36 | 36 |
37 // Returns the target rectangle for the frame background, based on a mouse | 37 // Returns the target rectangle for the frame background, based on a mouse |
38 // position from |hittest_code| and the window's active/inactive state. | 38 // position from |hittest_code| and the window's active/inactive state. |
39 // Pass HTNOWHERE to get default bounds. | 39 // Pass HTNOWHERE to get default bounds. |
40 gfx::Rect GetFrameBackgroundBounds(int hittest_code, bool active_window); | 40 gfx::Rect GetFrameBackgroundBounds(int hittest_code, bool active_window); |
41 | 41 |
42 // Recomputes the bounds of the semi-transparent frame background. | 42 // Recomputes the bounds of the semi-transparent frame background. |
43 void UpdateFrameBackground(bool active_window); | 43 void UpdateFrameBackground(bool active_window); |
44 | 44 |
| 45 // Invoked when the active state changes. |
| 46 void ActiveStateChanged(); |
| 47 |
45 // BrowserNonClientFrameView overrides: | 48 // BrowserNonClientFrameView overrides: |
46 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE; | 49 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE; |
47 virtual int GetHorizontalTabStripVerticalOffset(bool restored) const OVERRIDE; | 50 virtual int GetHorizontalTabStripVerticalOffset(bool restored) const OVERRIDE; |
48 virtual void UpdateThrobber(bool running) OVERRIDE; | 51 virtual void UpdateThrobber(bool running) OVERRIDE; |
49 virtual AvatarMenuButton* GetAvatarMenuButton() OVERRIDE; | 52 virtual AvatarMenuButton* GetAvatarMenuButton() OVERRIDE; |
50 | 53 |
51 // views::NonClientFrameView overrides: | 54 // views::NonClientFrameView overrides: |
52 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 55 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
53 virtual gfx::Rect GetWindowBoundsForClientBounds( | 56 virtual gfx::Rect GetWindowBoundsForClientBounds( |
54 const gfx::Rect& client_bounds) const OVERRIDE; | 57 const gfx::Rect& client_bounds) const OVERRIDE; |
55 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 58 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
56 virtual void GetWindowMask(const gfx::Size& size, | 59 virtual void GetWindowMask(const gfx::Size& size, |
57 gfx::Path* window_mask) OVERRIDE; | 60 gfx::Path* window_mask) OVERRIDE; |
58 virtual void EnableClose(bool enable) OVERRIDE; | 61 virtual void EnableClose(bool enable) OVERRIDE; |
59 virtual void ResetWindowControls() OVERRIDE; | 62 virtual void ResetWindowControls() OVERRIDE; |
60 virtual void UpdateWindowIcon() OVERRIDE; | 63 virtual void UpdateWindowIcon() OVERRIDE; |
| 64 virtual void ShouldPaintAsActiveChanged() OVERRIDE; |
61 | 65 |
62 // views::View overrides: | 66 // views::View overrides: |
63 virtual void Layout() OVERRIDE; | 67 virtual void Layout() OVERRIDE; |
64 virtual views::View* GetEventHandlerForPoint( | 68 virtual views::View* GetEventHandlerForPoint( |
65 const gfx::Point& point) OVERRIDE; | 69 const gfx::Point& point) OVERRIDE; |
66 virtual bool HitTest(const gfx::Point& p) const OVERRIDE; | 70 virtual bool HitTest(const gfx::Point& p) const OVERRIDE; |
67 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; | 71 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; |
68 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; | 72 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; |
69 virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE; | 73 virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE; |
70 virtual void ViewHierarchyChanged(bool is_add, | 74 virtual void ViewHierarchyChanged(bool is_add, |
(...skipping 12 matching lines...) Expand all Loading... |
83 BrowserView* browser_view_; | 87 BrowserView* browser_view_; |
84 int last_hittest_code_; | 88 int last_hittest_code_; |
85 WindowControlButton* maximize_button_; | 89 WindowControlButton* maximize_button_; |
86 WindowControlButton* close_button_; | 90 WindowControlButton* close_button_; |
87 FrameBackground* frame_background_; | 91 FrameBackground* frame_background_; |
88 | 92 |
89 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAura); | 93 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAura); |
90 }; | 94 }; |
91 | 95 |
92 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ | 96 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ |
OLD | NEW |