Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(950)

Side by Side Diff: chrome/browser/ui/views/frame/app_non_client_frame_view_aura.h

Issue 9359022: Aura: Support hovering restore & close buttons for full screen apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_test Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 views::MouseWatcherListener {
25 public:
26 AppNonClientFrameViewAura(
27 BrowserFrame* frame, BrowserView* browser_view);
28 virtual ~AppNonClientFrameViewAura();
29
30 // NonClientFrameView:
31 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
32 virtual gfx::Rect GetWindowBoundsForClientBounds(
33 const gfx::Rect& client_bounds) const OVERRIDE;
34 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
35 virtual void GetWindowMask(
36 const gfx::Size& size,
37 gfx::Path* window_mask) OVERRIDE;
38 virtual void ResetWindowControls() OVERRIDE;
39 virtual void UpdateWindowIcon() OVERRIDE;
40
41 // BrowserNonClientFrameView:
42 virtual gfx::Rect GetBoundsForTabStrip(
43 views::View* tabstrip) const OVERRIDE;
44 virtual int GetHorizontalTabStripVerticalOffset(
45 bool restored) const OVERRIDE;
46 virtual void UpdateThrobber(bool running) OVERRIDE;
47
48 // View:
49 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE;
50
51 // views::MouseWatcherListener.
52 virtual void MouseMovedOutOfHost() OVERRIDE;
53
54 // Close the app window.
55 void Close();
56
57 // Restore the app window (will result in switching the frame_view back).
58 void Restore();
59
60 private:
61 class ControlView;
62 class Host;
63
64 gfx::Rect GetControlBounds() const;
65
66 // The View containing the restore and close buttons.
67 ControlView* control_view_;
68 // The widget holding the control_view_.
69 views::Widget* control_widget_;
70 // Tracks the mouse and causes the controls to slide back up when it exits.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698