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

Side by Side Diff: ui/aura_shell/stacking_controller.h

Issue 8894018: Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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
« no previous file with comments | « ui/aura_shell/shell.cc ('k') | ui/aura_shell/stacking_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_AURA_SHELL_STACKING_CONTROLLER_H_ 5 #ifndef UI_AURA_SHELL_STACKING_CONTROLLER_H_
6 #define UI_AURA_SHELL_STACKING_CONTROLLER_H_ 6 #define UI_AURA_SHELL_STACKING_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "ui/aura/client/stacking_client.h" 12 #include "ui/aura/client/stacking_client.h"
13 13
14 namespace aura_shell { 14 namespace aura_shell {
15 namespace internal { 15 namespace internal {
16 16
17 class AlwaysOnTopController; 17 class AlwaysOnTopController;
18 18
19 class StackingController : public aura::StackingClient { 19 class StackingController : public aura::StackingClient {
20 public: 20 public:
21 StackingController(); 21 StackingController();
22 virtual ~StackingController(); 22 virtual ~StackingController();
23 23
24 // Initializes this controller. 24 // Initializes this controller.
25 void Init(); 25 void Init();
26 26
27 // Returns true if |window| exists within a container that supports
28 // activation.
29 static aura::Window* GetActivatableWindow(aura::Window* window);
30
31 // Overridden from aura::StackingClient: 27 // Overridden from aura::StackingClient:
32 virtual void AddChildToDefaultParent(aura::Window* window) OVERRIDE; 28 virtual void AddChildToDefaultParent(aura::Window* window) OVERRIDE;
33 virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE;
34 virtual aura::Window* GetTopmostWindowToActivate(
35 aura::Window* ignore) const OVERRIDE;
36 29
37 private: 30 private:
38 // Returns corresponding modal container for a modal window. 31 // Returns corresponding modal container for a modal window.
39 // If screen lock is not active, all modal windows are placed into the 32 // If screen lock is not active, all modal windows are placed into the
40 // normal modal container. 33 // normal modal container.
41 // Otherwise those that originate from LockScreen container and above are 34 // Otherwise those that originate from LockScreen container and above are
42 // placed in the screen lock modal container. 35 // placed in the screen lock modal container.
43 aura::Window* GetModalContainer(aura::Window* window) const; 36 aura::Window* GetModalContainer(aura::Window* window) const;
44 37
45 scoped_ptr<internal::AlwaysOnTopController> always_on_top_controller_; 38 scoped_ptr<internal::AlwaysOnTopController> always_on_top_controller_;
46 39
47 DISALLOW_COPY_AND_ASSIGN(StackingController); 40 DISALLOW_COPY_AND_ASSIGN(StackingController);
48 }; 41 };
49 42
50 } // namespace internal 43 } // namespace internal
51 } // namespace aura_shell 44 } // namespace aura_shell
52 45
53 #endif // UI_AURA_SHELL_STACKING_CONTROLLER_H_ 46 #endif // UI_AURA_SHELL_STACKING_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/shell.cc ('k') | ui/aura_shell/stacking_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698