OLD | NEW |
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 #include "aura/desktop.h" | 5 #include "aura/desktop.h" |
6 #include "aura/event.h" | 6 #include "aura/event.h" |
7 #include "aura/window.h" | 7 #include "aura/window.h" |
8 #include "aura/window_delegate.h" | 8 #include "aura/window_delegate.h" |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/i18n/icu_util.h" | 11 #include "base/i18n/icu_util.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "third_party/skia/include/core/SkXfermode.h" | 13 #include "third_party/skia/include/core/SkXfermode.h" |
14 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
15 #include "ui/base/ui_base_paths.h" | 15 #include "ui/base/ui_base_paths.h" |
16 #include "ui/gfx/canvas_skia.h" | 16 #include "ui/gfx/canvas_skia.h" |
17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
18 | 18 |
| 19 #if defined(USE_X11) |
| 20 #include "aura/hit_test.h" |
| 21 #include "base/message_pump_x.h" |
| 22 #endif |
| 23 |
19 namespace { | 24 namespace { |
20 | 25 |
21 // Trivial WindowDelegate implementation that draws a colored background. | 26 // Trivial WindowDelegate implementation that draws a colored background. |
22 class DemoWindowDelegate : public aura::WindowDelegate { | 27 class DemoWindowDelegate : public aura::WindowDelegate { |
23 public: | 28 public: |
24 explicit DemoWindowDelegate(SkColor color) : color_(color) {} | 29 explicit DemoWindowDelegate(SkColor color) : color_(color) {} |
25 | 30 |
26 virtual void OnFocus() OVERRIDE {} | 31 virtual void OnFocus() OVERRIDE {} |
27 virtual void OnBlur() OVERRIDE {} | 32 virtual void OnBlur() OVERRIDE {} |
28 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { | 33 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 window3.set_id(3); | 96 window3.set_id(3); |
92 window3.Init(); | 97 window3.Init(); |
93 window3.SetBounds(gfx::Rect(10, 10, 50, 50), 0); | 98 window3.SetBounds(gfx::Rect(10, 10, 50, 50), 0); |
94 window3.SetVisibility(aura::Window::VISIBILITY_SHOWN); | 99 window3.SetVisibility(aura::Window::VISIBILITY_SHOWN); |
95 window3.SetParent(&window2); | 100 window3.SetParent(&window2); |
96 | 101 |
97 aura::Desktop::GetInstance()->Run(); | 102 aura::Desktop::GetInstance()->Run(); |
98 return 0; | 103 return 0; |
99 } | 104 } |
100 | 105 |
OLD | NEW |