| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "mojo/application/application_runner_chromium.h" | 9 #include "mojo/application/application_runner_chromium.h" |
| 10 #include "mojo/gpu/gl_texture.h" | 10 #include "mojo/gpu/gl_texture.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 nullptr); | 170 nullptr); |
| 171 keyboard_sp->ConnectToService(keyboard::KeyboardService::Name_, | 171 keyboard_sp->ConnectToService(keyboard::KeyboardService::Name_, |
| 172 GetProxy(&keyboard_).PassMessagePipe()); | 172 GetProxy(&keyboard_).PassMessagePipe()); |
| 173 | 173 |
| 174 keyboard_->ShowByRequest(); | 174 keyboard_->ShowByRequest(); |
| 175 keyboard_->Hide(); | 175 keyboard_->Hide(); |
| 176 | 176 |
| 177 keyboard::KeyboardClientPtr keyboard_client; | 177 keyboard::KeyboardClientPtr keyboard_client; |
| 178 auto request = mojo::GetProxy(&keyboard_client); | 178 auto request = mojo::GetProxy(&keyboard_client); |
| 179 binding_.Bind(request.Pass()); | 179 binding_.Bind(request.Pass()); |
| 180 keyboard_->Show(keyboard_client.Pass(), keyboard::KEYBOARD_TYPE_TEXT); | 180 keyboard_->Show(keyboard_client.Pass(), keyboard::KeyboardType::TEXT); |
| 181 | 181 |
| 182 mojo::ServiceProviderPtr surfaces_service_provider; | 182 mojo::ServiceProviderPtr surfaces_service_provider; |
| 183 shell_->ConnectToApplication("mojo:surfaces_service", | 183 shell_->ConnectToApplication("mojo:surfaces_service", |
| 184 mojo::GetProxy(&surfaces_service_provider), | 184 mojo::GetProxy(&surfaces_service_provider), |
| 185 nullptr); | 185 nullptr); |
| 186 mojo::ConnectToService(surfaces_service_provider.get(), &surface_); | 186 mojo::ConnectToService(surfaces_service_provider.get(), &surface_); |
| 187 gl_context_ = mojo::GLContext::Create(shell_); | 187 gl_context_ = mojo::GLContext::Create(shell_); |
| 188 | 188 |
| 189 surface_->CreateSurface(root_view_surface_id_); | 189 surface_->CreateSurface(root_view_surface_id_); |
| 190 surface_->CreateSurface(text_view_surface_id_); | 190 surface_->CreateSurface(text_view_surface_id_); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 DISALLOW_COPY_AND_ASSIGN(KeyboardDelegate); | 395 DISALLOW_COPY_AND_ASSIGN(KeyboardDelegate); |
| 396 }; | 396 }; |
| 397 | 397 |
| 398 } // namespace examples | 398 } // namespace examples |
| 399 | 399 |
| 400 MojoResult MojoMain(MojoHandle application_request) { | 400 MojoResult MojoMain(MojoHandle application_request) { |
| 401 mojo::ApplicationRunnerChromium runner(new examples::KeyboardDelegate); | 401 mojo::ApplicationRunnerChromium runner(new examples::KeyboardDelegate); |
| 402 return runner.Run(application_request); | 402 return runner.Run(application_request); |
| 403 } | 403 } |
| OLD | NEW |