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 "mash/quick_launch/quick_launch_application.h" | 5 #include "mash/quick_launch/quick_launch_application.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
10 #include "mojo/public/c/system/main.h" | 11 #include "mojo/public/c/system/main.h" |
11 #include "mojo/services/tracing/public/cpp/tracing_impl.h" | 12 #include "mojo/services/tracing/public/cpp/tracing_impl.h" |
12 #include "mojo/shell/public/cpp/application_runner.h" | 13 #include "mojo/shell/public/cpp/application_runner.h" |
13 #include "mojo/shell/public/cpp/connector.h" | 14 #include "mojo/shell/public/cpp/connector.h" |
14 #include "mojo/shell/public/cpp/shell_client.h" | 15 #include "mojo/shell/public/cpp/shell_client.h" |
15 #include "ui/views/background.h" | 16 #include "ui/views/background.h" |
16 #include "ui/views/controls/textfield/textfield.h" | 17 #include "ui/views/controls/textfield/textfield.h" |
17 #include "ui/views/controls/textfield/textfield_controller.h" | 18 #include "ui/views/controls/textfield/textfield_controller.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 99 |
99 views::Widget* window = views::Widget::CreateWindowWithBounds( | 100 views::Widget* window = views::Widget::CreateWindowWithBounds( |
100 new QuickLaunchUI(connector), gfx::Rect(10, 640, 0, 0)); | 101 new QuickLaunchUI(connector), gfx::Rect(10, 640, 0, 0)); |
101 window->Show(); | 102 window->Show(); |
102 } | 103 } |
103 | 104 |
104 bool QuickLaunchApplication::AcceptConnection(mojo::Connection* connection) { | 105 bool QuickLaunchApplication::AcceptConnection(mojo::Connection* connection) { |
105 return true; | 106 return true; |
106 } | 107 } |
107 | 108 |
| 109 void QuickLaunchApplication::ShellConnectionLost() { |
| 110 base::MessageLoop::current()->QuitWhenIdle(); |
| 111 } |
| 112 |
108 } // namespace quick_launch | 113 } // namespace quick_launch |
109 } // namespace mash | 114 } // namespace mash |
OLD | NEW |