| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "third_party/skia/include/core/SkXfermode.h" | 10 #include "third_party/skia/include/core/SkXfermode.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 public: | 38 public: |
| 39 explicit DemoWindowDelegate(SkColor color) : color_(color) {} | 39 explicit DemoWindowDelegate(SkColor color) : color_(color) {} |
| 40 | 40 |
| 41 // Overridden from WindowDelegate: | 41 // Overridden from WindowDelegate: |
| 42 gfx::Size GetMinimumSize() const override { return gfx::Size(); } | 42 gfx::Size GetMinimumSize() const override { return gfx::Size(); } |
| 43 | 43 |
| 44 gfx::Size GetMaximumSize() const override { return gfx::Size(); } | 44 gfx::Size GetMaximumSize() const override { return gfx::Size(); } |
| 45 | 45 |
| 46 void OnBoundsChanged(const gfx::Rect& old_bounds, | 46 void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 47 const gfx::Rect& new_bounds) override {} | 47 const gfx::Rect& new_bounds) override {} |
| 48 ui::TextInputClient* GetFocusedTextInputClient() override { return nullptr; } |
| 48 gfx::NativeCursor GetCursor(const gfx::Point& point) override { | 49 gfx::NativeCursor GetCursor(const gfx::Point& point) override { |
| 49 return gfx::kNullCursor; | 50 return gfx::kNullCursor; |
| 50 } | 51 } |
| 51 int GetNonClientComponent(const gfx::Point& point) const override { | 52 int GetNonClientComponent(const gfx::Point& point) const override { |
| 52 return HTCAPTION; | 53 return HTCAPTION; |
| 53 } | 54 } |
| 54 bool ShouldDescendIntoChildForEventHandling( | 55 bool ShouldDescendIntoChildForEventHandling( |
| 55 aura::Window* child, | 56 aura::Window* child, |
| 56 const gfx::Point& location) override { | 57 const gfx::Point& location) override { |
| 57 return true; | 58 return true; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 74 DISALLOW_COPY_AND_ASSIGN(DemoWindowDelegate); | 75 DISALLOW_COPY_AND_ASSIGN(DemoWindowDelegate); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 class DemoWindowTreeClient : public aura::client::WindowTreeClient { | 78 class DemoWindowTreeClient : public aura::client::WindowTreeClient { |
| 78 public: | 79 public: |
| 79 explicit DemoWindowTreeClient(aura::Window* window) : window_(window) { | 80 explicit DemoWindowTreeClient(aura::Window* window) : window_(window) { |
| 80 aura::client::SetWindowTreeClient(window_, this); | 81 aura::client::SetWindowTreeClient(window_, this); |
| 81 } | 82 } |
| 82 | 83 |
| 83 ~DemoWindowTreeClient() override { | 84 ~DemoWindowTreeClient() override { |
| 84 aura::client::SetWindowTreeClient(window_, NULL); | 85 aura::client::SetWindowTreeClient(window_, nullptr); |
| 85 } | 86 } |
| 86 | 87 |
| 87 // Overridden from aura::client::WindowTreeClient: | 88 // Overridden from aura::client::WindowTreeClient: |
| 88 aura::Window* GetDefaultParent(aura::Window* context, | 89 aura::Window* GetDefaultParent(aura::Window* context, |
| 89 aura::Window* window, | 90 aura::Window* window, |
| 90 const gfx::Rect& bounds) override { | 91 const gfx::Rect& bounds) override { |
| 91 if (!capture_client_) { | 92 if (!capture_client_) { |
| 92 capture_client_.reset( | 93 capture_client_.reset( |
| 93 new aura::client::DefaultCaptureClient(window_->GetRootWindow())); | 94 new aura::client::DefaultCaptureClient(window_->GetRootWindow())); |
| 94 } | 95 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 int main(int argc, char** argv) { | 173 int main(int argc, char** argv) { |
| 173 base::CommandLine::Init(argc, argv); | 174 base::CommandLine::Init(argc, argv); |
| 174 | 175 |
| 175 // The exit manager is in charge of calling the dtors of singleton objects. | 176 // The exit manager is in charge of calling the dtors of singleton objects. |
| 176 base::AtExitManager exit_manager; | 177 base::AtExitManager exit_manager; |
| 177 | 178 |
| 178 base::i18n::InitializeICU(); | 179 base::i18n::InitializeICU(); |
| 179 | 180 |
| 180 return DemoMain(); | 181 return DemoMain(); |
| 181 } | 182 } |
| OLD | NEW |