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

Side by Side Diff: ui/views/corewm/activation_change_shim.h

Issue 11421194: Hook up the FocusController behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_COREWM_ACTIVATION_CHANGE_SHIM_
6 #define UI_VIEWS_COREWM_ACTIVATION_CHANGE_SHIM_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ui/aura/client/activation_change_observer.h"
11 #include "ui/base/events/event_handler.h"
12 #include "ui/views/corewm/focus_change_event.h"
13 #include "ui/views/views_export.h"
14
15 namespace ui {
16 class EventTarget;
17 }
18
19 namespace views {
20 namespace corewm {
21
22 // A class that converts FocusChangeEvents to calls to an
23 // ActivationChangeObserver. An interim bandaid that allows us to incrementally
24 // convert observers to use the new FocusController.
25 class VIEWS_EXPORT ActivationChangeShim
26 : public aura::client::ActivationChangeObserver,
27 public ui::EventHandler {
28 protected:
29 explicit ActivationChangeShim(ui::EventTarget* target);
30 virtual ~ActivationChangeShim();
31
32 // Overridden from aura::client::ActivationChangeObserver:
33 virtual void OnWindowActivated(aura::Window* active,
34 aura::Window* old_active) OVERRIDE;
35
36 // Overridden from ui::EventHandler:
37 virtual ui::EventResult OnEvent(ui::Event* event) OVERRIDE;
38
39 private:
40 ui::EventTarget* target_;
41
42 DISALLOW_COPY_AND_ASSIGN(ActivationChangeShim);
43 };
44
45 } // namespace corewm
46 } // namespace views
47
48 #endif // UI_VIEWS_COREWM_ACTIVATION_CHANGE_SHIM_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_controller_aura.cc ('k') | ui/views/corewm/activation_change_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698