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