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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/i18n/icu_util.h" | 7 #include "base/i18n/icu_util.h" |
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 "third_party/skia/include/core/SkXfermode.h" | 10 #include "third_party/skia/include/core/SkXfermode.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "base/message_pump_x.h" | 22 #include "base/message_pump_x.h" |
23 #endif | 23 #endif |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // Trivial WindowDelegate implementation that draws a colored background. | 27 // Trivial WindowDelegate implementation that draws a colored background. |
28 class DemoWindowDelegate : public aura::WindowDelegate { | 28 class DemoWindowDelegate : public aura::WindowDelegate { |
29 public: | 29 public: |
30 explicit DemoWindowDelegate(SkColor color) : color_(color) {} | 30 explicit DemoWindowDelegate(SkColor color) : color_(color) {} |
31 | 31 |
| 32 // Overridden from WindowDelegate: |
| 33 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 34 const gfx::Rect& new_bounds) OVERRIDE {} |
32 virtual void OnFocus() OVERRIDE {} | 35 virtual void OnFocus() OVERRIDE {} |
33 virtual void OnBlur() OVERRIDE {} | 36 virtual void OnBlur() OVERRIDE {} |
34 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { | 37 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { |
35 return false; | 38 return false; |
36 } | 39 } |
37 | 40 |
38 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE { | 41 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE { |
39 return HTCAPTION; | 42 return HTCAPTION; |
40 } | 43 } |
41 | 44 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 window3.set_id(3); | 103 window3.set_id(3); |
101 window3.Init(); | 104 window3.Init(); |
102 window3.SetBounds(gfx::Rect(10, 10, 50, 50), 0); | 105 window3.SetBounds(gfx::Rect(10, 10, 50, 50), 0); |
103 window3.SetVisibility(aura::Window::VISIBILITY_SHOWN); | 106 window3.SetVisibility(aura::Window::VISIBILITY_SHOWN); |
104 window3.SetParent(&window2); | 107 window3.SetParent(&window2); |
105 | 108 |
106 aura::Desktop::GetInstance()->Run(); | 109 aura::Desktop::GetInstance()->Run(); |
107 return 0; | 110 return 0; |
108 } | 111 } |
109 | 112 |
OLD | NEW |