| 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/desktop_host.h" | 6 #include "aura/desktop_host.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 "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "third_party/skia/include/core/SkXfermode.h" | 14 #include "third_party/skia/include/core/SkXfermode.h" |
| 15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
| 16 #include "ui/base/ui_base_paths.h" |
| 16 #include "ui/gfx/canvas.h" | 17 #include "ui/gfx/canvas.h" |
| 17 #include "ui/gfx/canvas_skia.h" | 18 #include "ui/gfx/canvas_skia.h" |
| 18 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
| 19 #include "ui/base/ui_base_paths.h" | |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // Trivial WindowDelegate implementation that draws a blue background. | 23 // Trivial WindowDelegate implementation that draws a blue background. |
| 24 class DemoWindowDelegate : public aura::WindowDelegate { | 24 class DemoWindowDelegate : public aura::WindowDelegate { |
| 25 public: | 25 public: |
| 26 explicit DemoWindowDelegate(aura::Window* window, SkColor color); | 26 explicit DemoWindowDelegate(aura::Window* window, SkColor color); |
| 27 | 27 |
| 28 virtual void OnPaint(const gfx::Rect& bounds) OVERRIDE; | 28 virtual void OnPaint(const gfx::Rect& bounds) OVERRIDE; |
| 29 | 29 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 window3.set_delegate(&window_delegate3); | 96 window3.set_delegate(&window_delegate3); |
| 97 | 97 |
| 98 window2.AddChild(&window3); | 98 window2.AddChild(&window3); |
| 99 | 99 |
| 100 host->Show(); | 100 host->Show(); |
| 101 | 101 |
| 102 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 102 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
| 103 MessageLoopForUI::current()->Run(host.get()); | 103 MessageLoopForUI::current()->Run(host.get()); |
| 104 return 0; | 104 return 0; |
| 105 } | 105 } |
| OLD | NEW |