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

Side by Side Diff: ui/aura/client/activation_client.h

Issue 38423002: Make aura::clients take Window instead of RootWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 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 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 UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ 5 #ifndef UI_AURA_CLIENT_ACTIVATION_CLIENT_H_
6 #define UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ 6 #define UI_AURA_CLIENT_ACTIVATION_CLIENT_H_
7 7
8 #include "ui/aura/aura_export.h" 8 #include "ui/aura/aura_export.h"
9 #include "ui/aura/window.h"
10 9
11 namespace ui { 10 namespace ui {
12 class Event; 11 class Event;
13 } 12 }
14 13
15 namespace aura { 14 namespace aura {
16 class RootWindow; 15 class Window;
17 16
18 namespace client { 17 namespace client {
19 class ActivationChangeObserver; 18 class ActivationChangeObserver;
20 19
21 // An interface implemented by an object that manages window activation. 20 // An interface implemented by an object that manages window activation.
22 class AURA_EXPORT ActivationClient { 21 class AURA_EXPORT ActivationClient {
23 public: 22 public:
24 // Adds/Removes ActivationChangeObservers. 23 // Adds/Removes ActivationChangeObservers.
25 virtual void AddObserver(ActivationChangeObserver* observer) = 0; 24 virtual void AddObserver(ActivationChangeObserver* observer) = 0;
26 virtual void RemoveObserver(ActivationChangeObserver* observer) = 0; 25 virtual void RemoveObserver(ActivationChangeObserver* observer) = 0;
(...skipping 23 matching lines...) Expand all
50 virtual bool OnWillFocusWindow(Window* window, const ui::Event* event) = 0; 49 virtual bool OnWillFocusWindow(Window* window, const ui::Event* event) = 0;
51 50
52 // Returns true if |window| can be activated, false otherwise. If |window| has 51 // Returns true if |window| can be activated, false otherwise. If |window| has
53 // a modal child it can not be activated. 52 // a modal child it can not be activated.
54 virtual bool CanActivateWindow(Window* window) const = 0; 53 virtual bool CanActivateWindow(Window* window) const = 0;
55 54
56 protected: 55 protected:
57 virtual ~ActivationClient() {} 56 virtual ~ActivationClient() {}
58 }; 57 };
59 58
60 // Sets/Gets the activation client on the RootWindow. 59 // Sets/Gets the activation client on the root Window.
61 AURA_EXPORT void SetActivationClient(RootWindow* root_window, 60 AURA_EXPORT void SetActivationClient(Window* root_window,
62 ActivationClient* client); 61 ActivationClient* client);
63 AURA_EXPORT ActivationClient* GetActivationClient(RootWindow* root_window); 62 AURA_EXPORT ActivationClient* GetActivationClient(Window* root_window);
64 63
65 // Some types of transient window are only visible when active. 64 // Some types of transient window are only visible when active.
66 // The transient parents of these windows may have visual appearance properties 65 // The transient parents of these windows may have visual appearance properties
67 // that differ from transient parents that can be deactivated. 66 // that differ from transient parents that can be deactivated.
68 // The presence of this property implies these traits. 67 // The presence of this property implies these traits.
69 // TODO(beng): currently the UI framework (views) implements the actual 68 // TODO(beng): currently the UI framework (views) implements the actual
70 // close-on-deactivate component of this feature but it should be 69 // close-on-deactivate component of this feature but it should be
71 // possible to implement in the aura client. 70 // possible to implement in the aura client.
72 AURA_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate); 71 AURA_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate);
73 AURA_EXPORT bool GetHideOnDeactivate(Window* window); 72 AURA_EXPORT bool GetHideOnDeactivate(Window* window);
74 73
75 } // namespace clients 74 } // namespace clients
76 } // namespace aura 75 } // namespace aura
77 76
78 #endif // UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ 77 #endif // UI_AURA_CLIENT_ACTIVATION_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc ('k') | ui/aura/client/activation_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698