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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 bool OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) override { | 101 bool OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) override { |
102 window->SetBounds(*bounds); | 102 window->SetBounds(*bounds); |
103 return true; | 103 return true; |
104 } | 104 } |
105 bool OnWmSetProperty( | 105 bool OnWmSetProperty( |
106 aura::Window* window, | 106 aura::Window* window, |
107 const std::string& name, | 107 const std::string& name, |
108 std::unique_ptr<std::vector<uint8_t>>* new_data) override { | 108 std::unique_ptr<std::vector<uint8_t>>* new_data) override { |
109 return true; | 109 return true; |
110 } | 110 } |
| 111 void OnWmSetModalType(aura::Window* window, ui::ModalType type) override {} |
111 void OnWmSetCanFocus(aura::Window* window, bool can_focus) override {} | 112 void OnWmSetCanFocus(aura::Window* window, bool can_focus) override {} |
112 aura::Window* OnWmCreateTopLevelWindow( | 113 aura::Window* OnWmCreateTopLevelWindow( |
113 ui::mojom::WindowType window_type, | 114 ui::mojom::WindowType window_type, |
114 std::map<std::string, std::vector<uint8_t>>* properties) override { | 115 std::map<std::string, std::vector<uint8_t>>* properties) override { |
115 aura::Window* window = new aura::Window(nullptr); | 116 aura::Window* window = new aura::Window(nullptr); |
116 SetWindowType(window, window_type); | 117 SetWindowType(window, window_type); |
117 window->Init(LAYER_NOT_DRAWN); | 118 window->Init(LAYER_NOT_DRAWN); |
118 window->SetBounds(gfx::Rect(10, 10, 500, 500)); | 119 window->SetBounds(gfx::Rect(10, 10, 500, 500)); |
119 root_->AddChild(window); | 120 root_->AddChild(window); |
120 return window; | 121 return window; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 DISALLOW_COPY_AND_ASSIGN(TestWM); | 191 DISALLOW_COPY_AND_ASSIGN(TestWM); |
191 }; | 192 }; |
192 | 193 |
193 } // namespace test | 194 } // namespace test |
194 } // namespace ui | 195 } // namespace ui |
195 | 196 |
196 MojoResult ServiceMain(MojoHandle service_request_handle) { | 197 MojoResult ServiceMain(MojoHandle service_request_handle) { |
197 service_manager::ServiceRunner runner(new ui::test::TestWM); | 198 service_manager::ServiceRunner runner(new ui::test::TestWM); |
198 return runner.Run(service_request_handle); | 199 return runner.Run(service_request_handle); |
199 } | 200 } |
OLD | NEW |