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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/i18n/icu_util.h" | 9 #include "base/i18n/icu_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 public: | 100 public: |
101 explicit DemoWindowParentingClient(aura::Window* window) : window_(window) { | 101 explicit DemoWindowParentingClient(aura::Window* window) : window_(window) { |
102 aura::client::SetWindowParentingClient(window_, this); | 102 aura::client::SetWindowParentingClient(window_, this); |
103 } | 103 } |
104 | 104 |
105 ~DemoWindowParentingClient() override { | 105 ~DemoWindowParentingClient() override { |
106 aura::client::SetWindowParentingClient(window_, nullptr); | 106 aura::client::SetWindowParentingClient(window_, nullptr); |
107 } | 107 } |
108 | 108 |
109 // Overridden from aura::client::WindowParentingClient: | 109 // Overridden from aura::client::WindowParentingClient: |
110 aura::Window* GetDefaultParent(aura::Window* context, | 110 aura::Window* GetDefaultParent(aura::Window* window, |
111 aura::Window* window, | |
112 const gfx::Rect& bounds) override { | 111 const gfx::Rect& bounds) override { |
113 if (!capture_client_) { | 112 if (!capture_client_) { |
114 capture_client_.reset( | 113 capture_client_.reset( |
115 new aura::client::DefaultCaptureClient(window_->GetRootWindow())); | 114 new aura::client::DefaultCaptureClient(window_->GetRootWindow())); |
116 } | 115 } |
117 return window_; | 116 return window_; |
118 } | 117 } |
119 | 118 |
120 private: | 119 private: |
121 aura::Window* window_; | 120 aura::Window* window_; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 int main(int argc, char** argv) { | 203 int main(int argc, char** argv) { |
205 base::CommandLine::Init(argc, argv); | 204 base::CommandLine::Init(argc, argv); |
206 | 205 |
207 // The exit manager is in charge of calling the dtors of singleton objects. | 206 // The exit manager is in charge of calling the dtors of singleton objects. |
208 base::AtExitManager exit_manager; | 207 base::AtExitManager exit_manager; |
209 | 208 |
210 base::i18n::InitializeICU(); | 209 base::i18n::InitializeICU(); |
211 | 210 |
212 return DemoMain(); | 211 return DemoMain(); |
213 } | 212 } |
OLD | NEW |