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

Side by Side Diff: views/widget/window_manager.h

Issue 7740039: Don't activate POPUP window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync 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 | Annotate | Revision Log
OLDNEW
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 VIEWS_WIDGET_WINDOW_MANAGER_H_ 5 #ifndef VIEWS_WIDGET_WINDOW_MANAGER_H_
6 #define VIEWS_WIDGET_WINDOW_MANAGER_H_ 6 #define VIEWS_WIDGET_WINDOW_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "views/views_export.h" 10 #include "views/views_export.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 class Point; 13 class Point;
14 } 14 }
15 15
16 namespace views { 16 namespace views {
17 class KeyEvent;
17 class MouseEvent; 18 class MouseEvent;
18 class Widget; 19 class Widget;
19 20
20 // A interface to WindowManager. 21 // A interface to WindowManager.
21 class VIEWS_EXPORT WindowManager { 22 class VIEWS_EXPORT WindowManager {
22 public: 23 public:
23 WindowManager(); 24 WindowManager();
24 virtual ~WindowManager(); 25 virtual ~WindowManager();
25 26
26 // Starts moving window given by |widget|. |point| represents the 27 // Starts moving window given by |widget|. |point| represents the
(...skipping 13 matching lines...) Expand all
40 41
41 // Releases the mouse capture on |widget|. Returns false if |widget| 42 // Releases the mouse capture on |widget|. Returns false if |widget|
42 // haven't capture the mouse. 43 // haven't capture the mouse.
43 virtual bool ReleaseMouseCapture(Widget* widget) = 0; 44 virtual bool ReleaseMouseCapture(Widget* widget) = 0;
44 45
45 // Checks if the |widget| has mouse capture. 46 // Checks if the |widget| has mouse capture.
46 virtual bool HasMouseCapture(const Widget* widget) const = 0; 47 virtual bool HasMouseCapture(const Widget* widget) const = 0;
47 48
48 // WindowManager handles mouse event first. It may reisze/move window, 49 // WindowManager handles mouse event first. It may reisze/move window,
49 // or send the event to widget that has mouse capture. 50 // or send the event to widget that has mouse capture.
51 virtual bool HandleKeyEvent(Widget* widget, const KeyEvent& event) = 0;
52
53 // WindowManager handles mouse event first. It may reisze/move window,
54 // or send the event to widget that has mouse capture.
50 virtual bool HandleMouseEvent(Widget* widget, const MouseEvent& event) = 0; 55 virtual bool HandleMouseEvent(Widget* widget, const MouseEvent& event) = 0;
51 56
57 // Register widget to the window manager.
58 virtual void Register(Widget* widget) = 0;
59
52 // Installs window manager. 60 // Installs window manager.
53 static void Install(WindowManager* wm); 61 static void Install(WindowManager* wm);
54 62
55 // Returns installed WindowManager. 63 // Returns installed WindowManager.
56 static WindowManager* Get(); 64 static WindowManager* Get();
57 65
58 private: 66 private:
59 DISALLOW_COPY_AND_ASSIGN(WindowManager); 67 DISALLOW_COPY_AND_ASSIGN(WindowManager);
60 }; 68 };
61 69
62 } // namespace views 70 } // namespace views
63 71
64 #endif // VIEWS_WIDGET_WINDOW_MANAGER_H_ 72 #endif // VIEWS_WIDGET_WINDOW_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698