| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 bool OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) override { | 101 bool OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) override { |
| 102 return true; | 102 return true; |
| 103 } | 103 } |
| 104 bool OnWmSetProperty( | 104 bool OnWmSetProperty( |
| 105 aura::Window* window, | 105 aura::Window* window, |
| 106 const std::string& name, | 106 const std::string& name, |
| 107 std::unique_ptr<std::vector<uint8_t>>* new_data) override { | 107 std::unique_ptr<std::vector<uint8_t>>* new_data) override { |
| 108 return true; | 108 return true; |
| 109 } | 109 } |
| 110 void OnWmSetCanFocus(aura::Window* window, bool can_focus) override {} |
| 110 aura::Window* OnWmCreateTopLevelWindow( | 111 aura::Window* OnWmCreateTopLevelWindow( |
| 111 ui::mojom::WindowType window_type, | 112 ui::mojom::WindowType window_type, |
| 112 std::map<std::string, std::vector<uint8_t>>* properties) override { | 113 std::map<std::string, std::vector<uint8_t>>* properties) override { |
| 113 aura::Window* window = new aura::Window(nullptr); | 114 aura::Window* window = new aura::Window(nullptr); |
| 114 SetWindowType(window, window_type); | 115 SetWindowType(window, window_type); |
| 115 window->Init(LAYER_NOT_DRAWN); | 116 window->Init(LAYER_NOT_DRAWN); |
| 116 window->SetBounds(gfx::Rect(10, 10, 500, 500)); | 117 window->SetBounds(gfx::Rect(10, 10, 500, 500)); |
| 117 root_->AddChild(window); | 118 root_->AddChild(window); |
| 118 return window; | 119 return window; |
| 119 } | 120 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 DISALLOW_COPY_AND_ASSIGN(TestWM); | 184 DISALLOW_COPY_AND_ASSIGN(TestWM); |
| 184 }; | 185 }; |
| 185 | 186 |
| 186 } // namespace test | 187 } // namespace test |
| 187 } // namespace ui | 188 } // namespace ui |
| 188 | 189 |
| 189 MojoResult ServiceMain(MojoHandle service_request_handle) { | 190 MojoResult ServiceMain(MojoHandle service_request_handle) { |
| 190 service_manager::ServiceRunner runner(new ui::test::TestWM); | 191 service_manager::ServiceRunner runner(new ui::test::TestWM); |
| 191 return runner.Run(service_request_handle); | 192 return runner.Run(service_request_handle); |
| 192 } | 193 } |
| OLD | NEW |