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

Side by Side Diff: ui/wm/core/default_activation_client.h

Issue 1151133003: Added an ActivationReason parameter to ActivationChangeObserver::OnWindowActivated(...). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded diff based on dependant CL. Created 5 years, 6 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
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/wm/core/default_activation_client.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_WM_CORE_DEFAULT_ACTIVATION_CLIENT_H_ 5 #ifndef UI_WM_CORE_DEFAULT_ACTIVATION_CLIENT_H_
6 #define UI_WM_CORE_DEFAULT_ACTIVATION_CLIENT_H_ 6 #define UI_WM_CORE_DEFAULT_ACTIVATION_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "ui/aura/window_observer.h" 13 #include "ui/aura/window_observer.h"
14 #include "ui/wm/public/activation_change_observer.h"
14 #include "ui/wm/public/activation_client.h" 15 #include "ui/wm/public/activation_client.h"
15 #include "ui/wm/wm_export.h" 16 #include "ui/wm/wm_export.h"
16 17
17 namespace aura { 18 namespace aura {
18 namespace client { 19 namespace client {
19 class ActivationChangeObserver; 20 class ActivationChangeObserver;
20 } 21 }
21 } 22 }
22 23
23 namespace wm { 24 namespace wm {
(...skipping 20 matching lines...) Expand all
44 45
45 // Overridden from WindowObserver: 46 // Overridden from WindowObserver:
46 void OnWindowDestroyed(aura::Window* window) override; 47 void OnWindowDestroyed(aura::Window* window) override;
47 48
48 private: 49 private:
49 class Deleter; 50 class Deleter;
50 51
51 ~DefaultActivationClient() override; 52 ~DefaultActivationClient() override;
52 void RemoveActiveWindow(aura::Window* window); 53 void RemoveActiveWindow(aura::Window* window);
53 54
55 void ActivateWindowImpl(
56 aura::client::ActivationChangeObserver::ActivationReason reason,
57 aura::Window* window);
58
54 // This class explicitly does NOT store the active window in a window property 59 // This class explicitly does NOT store the active window in a window property
55 // to make sure that ActivationChangeObserver is not treated as part of the 60 // to make sure that ActivationChangeObserver is not treated as part of the
56 // aura API. Assumptions to that end will cause tests that use this client to 61 // aura API. Assumptions to that end will cause tests that use this client to
57 // fail. 62 // fail.
58 std::vector<aura::Window*> active_windows_; 63 std::vector<aura::Window*> active_windows_;
59 64
60 // The window which was active before the currently active one. 65 // The window which was active before the currently active one.
61 aura::Window* last_active_; 66 aura::Window* last_active_;
62 67
63 ObserverList<aura::client::ActivationChangeObserver> observers_; 68 ObserverList<aura::client::ActivationChangeObserver> observers_;
64 69
65 DISALLOW_COPY_AND_ASSIGN(DefaultActivationClient); 70 DISALLOW_COPY_AND_ASSIGN(DefaultActivationClient);
66 }; 71 };
67 72
68 } // namespace wm 73 } // namespace wm
69 74
70 #endif // UI_WM_CORE_DEFAULT_ACTIVATION_CLIENT_H_ 75 #endif // UI_WM_CORE_DEFAULT_ACTIVATION_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/wm/core/default_activation_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698