| 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 "mash/example/window_type_launcher/window_type_launcher.h" | 5 #include "mash/example/window_type_launcher/window_type_launcher.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 WindowDelegateView::Create(WindowDelegateView::RESIZABLE | | 362 WindowDelegateView::Create(WindowDelegateView::RESIZABLE | |
| 363 WindowDelegateView::ALWAYS_ON_TOP); | 363 WindowDelegateView::ALWAYS_ON_TOP); |
| 364 } else if (sender == panel_button_) { | 364 } else if (sender == panel_button_) { |
| 365 WindowDelegateView::Create(WindowDelegateView::PANEL); | 365 WindowDelegateView::Create(WindowDelegateView::PANEL); |
| 366 } else if (sender == create_nonresizable_button_) { | 366 } else if (sender == create_nonresizable_button_) { |
| 367 WindowDelegateView::Create(0u); | 367 WindowDelegateView::Create(0u); |
| 368 } else if (sender == bubble_button_) { | 368 } else if (sender == bubble_button_) { |
| 369 NOTIMPLEMENTED(); | 369 NOTIMPLEMENTED(); |
| 370 } else if (sender == lock_button_) { | 370 } else if (sender == lock_button_) { |
| 371 mash::session::mojom::SessionPtr session; | 371 mash::session::mojom::SessionPtr session; |
| 372 connector_->ConnectToInterface("mojo:mash_session", &session); | 372 connector_->ConnectToInterface("service:mash_session", &session); |
| 373 session->LockScreen(); | 373 session->LockScreen(); |
| 374 } else if (sender == logout_button_) { | 374 } else if (sender == logout_button_) { |
| 375 mash::session::mojom::SessionPtr session; | 375 mash::session::mojom::SessionPtr session; |
| 376 connector_->ConnectToInterface("mojo:mash_session", &session); | 376 connector_->ConnectToInterface("service:mash_session", &session); |
| 377 session->Logout(); | 377 session->Logout(); |
| 378 } else if (sender == switch_user_button_) { | 378 } else if (sender == switch_user_button_) { |
| 379 mash::session::mojom::SessionPtr session; | 379 mash::session::mojom::SessionPtr session; |
| 380 connector_->ConnectToInterface("mojo:mash_session", &session); | 380 connector_->ConnectToInterface("service:mash_session", &session); |
| 381 session->SwitchUser(); | 381 session->SwitchUser(); |
| 382 } else if (sender == widgets_button_) { | 382 } else if (sender == widgets_button_) { |
| 383 NOTIMPLEMENTED(); | 383 NOTIMPLEMENTED(); |
| 384 } | 384 } |
| 385 else if (sender == system_modal_button_) { | 385 else if (sender == system_modal_button_) { |
| 386 ModalWindow::OpenModalWindow(nullptr, ui::MODAL_TYPE_SYSTEM); | 386 ModalWindow::OpenModalWindow(nullptr, ui::MODAL_TYPE_SYSTEM); |
| 387 } else if (sender == window_modal_button_) { | 387 } else if (sender == window_modal_button_) { |
| 388 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), | 388 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), |
| 389 ui::MODAL_TYPE_WINDOW); | 389 ui::MODAL_TYPE_WINDOW); |
| 390 } else if (sender == child_modal_button_) { | 390 } else if (sender == child_modal_button_) { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 500 |
| 501 void WindowTypeLauncher::Create(const shell::Identity& remote_identity, | 501 void WindowTypeLauncher::Create(const shell::Identity& remote_identity, |
| 502 mash::mojom::LaunchableRequest request) { | 502 mash::mojom::LaunchableRequest request) { |
| 503 bindings_.AddBinding(this, std::move(request)); | 503 bindings_.AddBinding(this, std::move(request)); |
| 504 } | 504 } |
| 505 | 505 |
| 506 MojoResult ServiceMain(MojoHandle service_request_handle) { | 506 MojoResult ServiceMain(MojoHandle service_request_handle) { |
| 507 return shell::ServiceRunner(new WindowTypeLauncher) | 507 return shell::ServiceRunner(new WindowTypeLauncher) |
| 508 .Run(service_request_handle); | 508 .Run(service_request_handle); |
| 509 } | 509 } |
| OLD | NEW |