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 14 matching lines...) Expand all Loading... |
25 #endif | 25 #endif |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // Trivial WindowDelegate implementation that draws a colored background. | 29 // Trivial WindowDelegate implementation that draws a colored background. |
30 class DemoWindowDelegate : public aura::WindowDelegate { | 30 class DemoWindowDelegate : public aura::WindowDelegate { |
31 public: | 31 public: |
32 explicit DemoWindowDelegate(SkColor color) : color_(color) {} | 32 explicit DemoWindowDelegate(SkColor color) : color_(color) {} |
33 | 33 |
34 // Overridden from aura::WindowDelegate: | 34 // Overridden from aura::WindowDelegate: |
| 35 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 36 const gfx::Rect& new_bounds) OVERRIDE {} |
35 virtual void OnFocus() OVERRIDE {} | 37 virtual void OnFocus() OVERRIDE {} |
36 virtual void OnBlur() OVERRIDE {} | 38 virtual void OnBlur() OVERRIDE {} |
37 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { | 39 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { |
38 return false; | 40 return false; |
39 } | 41 } |
40 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE { | 42 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE { |
41 return HTCLIENT; | 43 return HTCLIENT; |
42 } | 44 } |
43 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE { | 45 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE { |
44 return true; | 46 return true; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 contents, window2, gfx::Rect(120, 150, 200, 200)); | 171 contents, window2, gfx::Rect(120, 150, 200, 200)); |
170 views_window->Show(); | 172 views_window->Show(); |
171 | 173 |
172 aura::Desktop::GetInstance()->Run(); | 174 aura::Desktop::GetInstance()->Run(); |
173 | 175 |
174 delete aura::Desktop::GetInstance(); | 176 delete aura::Desktop::GetInstance(); |
175 | 177 |
176 return 0; | 178 return 0; |
177 } | 179 } |
178 | 180 |
OLD | NEW |