OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ | |
7 #pragma once | |
8 | |
9 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | |
10 #include "ui/base/animation/animation_delegate.h" | |
11 #include "ui/views/controls/button/button.h" | |
12 #include "ui/views/mouse_watcher.h" | |
13 | |
14 namespace aura { | |
15 class Window; | |
16 } | |
17 | |
18 namespace ui { | |
19 class SlideAnimation; | |
20 } | |
21 | |
22 // NonClientFrameViewAura implementation for apps. | |
23 class AppNonClientFrameViewAura : public BrowserNonClientFrameView, | |
24 public ui::AnimationDelegate, | |
25 public views::MouseWatcherListener { | |
26 public: | |
27 explicit AppNonClientFrameViewAura( | |
28 BrowserFrame* frame, BrowserView* browser_view); | |
sky
2012/02/09 01:04:17
no explicit
DaveMoore
2012/02/10 23:05:55
Done.
| |
29 virtual ~AppNonClientFrameViewAura(); | |
30 | |
31 // NonClientFrameView: | |
32 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | |
33 virtual gfx::Rect GetWindowBoundsForClientBounds( | |
34 const gfx::Rect& client_bounds) const OVERRIDE; | |
35 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | |
36 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) | |
37 OVERRIDE; | |
38 virtual void ResetWindowControls() OVERRIDE; | |
39 virtual void UpdateWindowIcon() OVERRIDE; | |
40 | |
41 // BrowserNonClientFrameView: | |
42 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const | |
43 OVERRIDE; | |
sky
2012/02/09 01:04:17
Similar to const, don't leave OVERRIDE on a line b
DaveMoore
2012/02/10 23:05:55
Done.
| |
44 virtual int GetHorizontalTabStripVerticalOffset(bool restored) const | |
45 OVERRIDE; | |
46 virtual void UpdateThrobber(bool running) OVERRIDE; | |
47 | |
48 // View: | |
49 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; | |
50 | |
51 // ui::AnimationDelegate. | |
52 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | |
53 | |
54 // views::MouseWatcherListener. | |
55 virtual void MouseMovedOutOfHost() OVERRIDE; | |
56 | |
57 // Close the app window. | |
58 void Close(); | |
59 // Restore the app window (will result in switching the frame_view back). | |
sky
2012/02/09 01:04:17
nit: newline between 58 and 59
DaveMoore
2012/02/10 23:05:55
Done.
| |
60 void Restore(); | |
61 | |
62 private: | |
63 class ControlView; | |
64 class Host; | |
65 | |
66 gfx::Rect GetControlBounds() const; | |
67 | |
68 ControlView* control_view_; | |
sky
2012/02/09 01:04:17
Add descriptions for these.
DaveMoore
2012/02/10 23:05:55
Done.
| |
69 views::Widget* control_widget_; | |
70 scoped_ptr<ui::SlideAnimation> show_animation_; | |
71 views::MouseWatcher mouse_watcher_; | |
72 | |
73 DISALLOW_COPY_AND_ASSIGN(AppNonClientFrameViewAura); | |
74 }; | |
75 | |
76 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ | |
OLD | NEW |