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

Side by Side Diff: chrome/browser/ui/views/fullscreen_exit_bubble_views.h

Issue 7549005: Abstract fullscreen exit bubble logic to bring Linux's behaviour in line with (Closed) Base URL: /usr/local/google/chromium2/src@trunk
Patch Set: Rebase attempt #3. Created 9 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_
7 #pragma once
8
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/ui/fullscreen_exit_bubble.h"
11 #include "views/controls/link_listener.h"
12
13 namespace views {
14 class View;
15 class Widget;
16 }
17
18 // FullscreenExitBubbleViews is responsible for showing a bubble atop the
19 // screen in fullscreen mode, telling users how to exit and providing a click
20 // target. The bubble auto-hides, and re-shows when the user moves to the
21 // screen top.
22 class FullscreenExitBubbleViews : public views::LinkListener,
23 public FullscreenExitBubble {
24 public:
25 FullscreenExitBubbleViews(
26 views::Widget* frame,
27 CommandUpdater::CommandUpdaterDelegate* delegate);
28 virtual ~FullscreenExitBubbleViews();
29
30 protected:
31 // FullScreenExitBubble
32 virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE;
33 virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
34 virtual bool WindowContainsPoint(gfx::Point pos) OVERRIDE;
35 virtual bool IsWindowActive() OVERRIDE;
36 virtual void Hide() OVERRIDE;
37 virtual void Show() OVERRIDE;
38 virtual bool IsAnimating() OVERRIDE;
39
40 private:
41 class FullscreenExitView;
42
43 // views::LinkListener:
44 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
45
46 // The root view containing us.
47 views::View* root_view_;
48
49 views::Widget* popup_;
50
51 // Animation controlling sliding into/out of the top of the screen.
52 scoped_ptr<ui::SlideAnimation> size_animation_;
53
54 // ui::AnimationDelegate:
55 void AnimationProgressed(const ui::Animation* animation);
56 void AnimationEnded(const ui::Animation* animation);
57
58 // The contents of the popup.
59 FullscreenExitView* view_;
60
61 DISALLOW_COPY_AND_ASSIGN(FullscreenExitBubbleViews);
62 };
63
64 #endif // CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/fullscreen_exit_bubble.cc ('k') | chrome/browser/ui/views/fullscreen_exit_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698