OLD | NEW |
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_ENV_H_ | 5 #ifndef UI_AURA_ENV_H_ |
6 #define UI_AURA_ENV_H_ | 6 #define UI_AURA_ENV_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
11 #include "ui/aura/aura_export.h" | 11 #include "ui/aura/aura_export.h" |
| 12 #include "ui/aura/client/stacking_client.h" |
12 #include "ui/base/events/event_handler.h" | 13 #include "ui/base/events/event_handler.h" |
13 #include "ui/base/events/event_target.h" | 14 #include "ui/base/events/event_target.h" |
14 #include "ui/gfx/point.h" | 15 #include "ui/gfx/point.h" |
15 | 16 |
16 #if defined(USE_X11) | 17 #if defined(USE_X11) |
17 #include "ui/aura/device_list_updater_aurax11.h" | 18 #include "ui/aura/device_list_updater_aurax11.h" |
18 #endif | 19 #endif |
19 | 20 |
20 namespace aura { | 21 namespace aura { |
21 class EnvObserver; | 22 class EnvObserver; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 bool is_touch_down() const { return is_touch_down_; } | 57 bool is_touch_down() const { return is_touch_down_; } |
57 void set_touch_down(bool value) { is_touch_down_ = value; } | 58 void set_touch_down(bool value) { is_touch_down_ = value; } |
58 | 59 |
59 // Whether RenderWidgetHostViewAura::OnPaint() should paint white background | 60 // Whether RenderWidgetHostViewAura::OnPaint() should paint white background |
60 // when backing store is not present. Default is true. | 61 // when backing store is not present. Default is true. |
61 // In some cases when page is using transparent background painting white | 62 // In some cases when page is using transparent background painting white |
62 // background before backing store is initialized causes a white splash. | 63 // background before backing store is initialized causes a white splash. |
63 bool render_white_bg() const { return render_white_bg_; } | 64 bool render_white_bg() const { return render_white_bg_; } |
64 void set_render_white_bg(bool value) { render_white_bg_ = value; } | 65 void set_render_white_bg(bool value) { render_white_bg_ = value; } |
65 | 66 |
| 67 client::StackingClient* stacking_client() { return stacking_client_; } |
| 68 void set_stacking_client(client::StackingClient* stacking_client) { |
| 69 stacking_client_ = stacking_client; |
| 70 } |
| 71 |
66 // Returns the native event dispatcher. The result should only be passed to | 72 // Returns the native event dispatcher. The result should only be passed to |
67 // base::RunLoop(dispatcher), or used to dispatch an event by | 73 // base::RunLoop(dispatcher), or used to dispatch an event by |
68 // |Dispatch(const NativeEvent&)| on it. It must never be stored. | 74 // |Dispatch(const NativeEvent&)| on it. It must never be stored. |
69 #if !defined(OS_MACOSX) | 75 #if !defined(OS_MACOSX) |
70 MessageLoop::Dispatcher* GetDispatcher(); | 76 MessageLoop::Dispatcher* GetDispatcher(); |
71 #endif | 77 #endif |
72 | 78 |
73 // Invoked by RootWindow when its host is activated. | 79 // Invoked by RootWindow when its host is activated. |
74 void RootWindowActivated(RootWindow* root_window); | 80 void RootWindowActivated(RootWindow* root_window); |
75 | 81 |
(...skipping 13 matching lines...) Expand all Loading... |
89 #if !defined(USE_X11) | 95 #if !defined(USE_X11) |
90 scoped_ptr<MessageLoop::Dispatcher> dispatcher_; | 96 scoped_ptr<MessageLoop::Dispatcher> dispatcher_; |
91 #endif | 97 #endif |
92 | 98 |
93 static Env* instance_; | 99 static Env* instance_; |
94 int mouse_button_flags_; | 100 int mouse_button_flags_; |
95 // Location of last mouse event, in screen coordinates. | 101 // Location of last mouse event, in screen coordinates. |
96 gfx::Point last_mouse_location_; | 102 gfx::Point last_mouse_location_; |
97 bool is_touch_down_; | 103 bool is_touch_down_; |
98 bool render_white_bg_; | 104 bool render_white_bg_; |
| 105 client::StackingClient* stacking_client_; |
99 | 106 |
100 #if defined(USE_X11) | 107 #if defined(USE_X11) |
101 DeviceListUpdaterAuraX11 device_list_updater_aurax11_; | 108 DeviceListUpdaterAuraX11 device_list_updater_aurax11_; |
102 #endif | 109 #endif |
103 | 110 |
104 DISALLOW_COPY_AND_ASSIGN(Env); | 111 DISALLOW_COPY_AND_ASSIGN(Env); |
105 }; | 112 }; |
106 | 113 |
107 } // namespace aura | 114 } // namespace aura |
108 | 115 |
109 #endif // UI_AURA_ENV_H_ | 116 #endif // UI_AURA_ENV_H_ |
OLD | NEW |