| 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 "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "views/widget/widget_delegate.h" | 23 #include "views/widget/widget_delegate.h" |
| 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 aura::WindowDelegate: | 32 // Overridden from aura::WindowDelegate: |
| 33 virtual void OnBoundsChanging(gfx::Rect* new_bounds) OVERRIDE {} |
| 33 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 34 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 34 const gfx::Rect& new_bounds) OVERRIDE {} | 35 const gfx::Rect& new_bounds) OVERRIDE {} |
| 35 virtual void OnFocus() OVERRIDE {} | 36 virtual void OnFocus() OVERRIDE {} |
| 36 virtual void OnBlur() OVERRIDE {} | 37 virtual void OnBlur() OVERRIDE {} |
| 37 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { | 38 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { |
| 38 return false; | 39 return false; |
| 39 } | 40 } |
| 40 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE { | 41 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE { |
| 41 return gfx::kNullCursor; | 42 return gfx::kNullCursor; |
| 42 } | 43 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 views::Widget* views_window = views::Widget::CreateWindowWithParentAndBounds( | 179 views::Widget* views_window = views::Widget::CreateWindowWithParentAndBounds( |
| 179 contents, window2, gfx::Rect(120, 150, 200, 200)); | 180 contents, window2, gfx::Rect(120, 150, 200, 200)); |
| 180 views_window->Show(); | 181 views_window->Show(); |
| 181 | 182 |
| 182 aura::Desktop::GetInstance()->Run(); | 183 aura::Desktop::GetInstance()->Run(); |
| 183 | 184 |
| 184 delete aura::Desktop::GetInstance(); | 185 delete aura::Desktop::GetInstance(); |
| 185 | 186 |
| 186 return 0; | 187 return 0; |
| 187 } | 188 } |
| OLD | NEW |