Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: ui/ozone/demo/ozone_demo.cc

Issue 1406333003: aura: Support SurfaceDestroyed() on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wth2
Patch Set: comment Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 void OnCloseRequest() override { Quit(); } 149 void OnCloseRequest() override { Quit(); }
150 void OnClosed() override {} 150 void OnClosed() override {}
151 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} 151 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {}
152 void OnLostCapture() override {} 152 void OnLostCapture() override {}
153 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, 153 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
154 float device_pixel_ratio) override { 154 float device_pixel_ratio) override {
155 DCHECK_NE(widget, gfx::kNullAcceleratedWidget); 155 DCHECK_NE(widget, gfx::kNullAcceleratedWidget);
156 widget_ = widget; 156 widget_ = widget;
157 } 157 }
158 void OnAcceleratedWidgetDestroyed() override {
159 NOTREACHED();
160 }
158 void OnActivationChanged(bool active) override {} 161 void OnActivationChanged(bool active) override {}
159 162
160 private: 163 private:
161 // Since we pretend to have a GPU process, we should also pretend to 164 // Since we pretend to have a GPU process, we should also pretend to
162 // initialize the GPU resources via a posted task. 165 // initialize the GPU resources via a posted task.
163 void StartOnGpu() { 166 void StartOnGpu() {
164 renderer_ = 167 renderer_ =
165 renderer_factory_->CreateRenderer(GetAcceleratedWidget(), GetSize()); 168 renderer_factory_->CreateRenderer(GetAcceleratedWidget(), GetSize());
166 renderer_->Initialize(); 169 renderer_->Initialize();
167 } 170 }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 ->SetCurrentLayoutByName("us"); 334 ->SetCurrentLayoutByName("us");
332 335
333 base::RunLoop run_loop; 336 base::RunLoop run_loop;
334 337
335 WindowManager window_manager(run_loop.QuitClosure()); 338 WindowManager window_manager(run_loop.QuitClosure());
336 339
337 run_loop.Run(); 340 run_loop.Run();
338 341
339 return 0; 342 return 0;
340 } 343 }
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_platform.cc ('k') | ui/platform_window/android/platform_window_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698