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 "mandoline/ui/omnibox/omnibox_impl.h" | 5 #include "mandoline/ui/omnibox/omnibox_impl.h" |
6 | 6 |
7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "components/view_manager/public/cpp/view_manager_client_factory.h" | 8 #include "components/view_manager/public/cpp/view_manager_client_factory.h" |
9 #include "components/window_manager/public/interfaces/window_manager.mojom.h" | |
10 #include "mandoline/ui/aura/aura_init.h" | 9 #include "mandoline/ui/aura/aura_init.h" |
11 #include "mandoline/ui/aura/native_widget_view_manager.h" | 10 #include "mandoline/ui/aura/native_widget_view_manager.h" |
12 #include "mojo/application/public/cpp/application_impl.h" | 11 #include "mojo/application/public/cpp/application_impl.h" |
13 #include "mojo/common/common_type_converters.h" | 12 #include "mojo/common/common_type_converters.h" |
14 #include "mojo/converters/geometry/geometry_type_converters.h" | 13 #include "mojo/converters/geometry/geometry_type_converters.h" |
15 #include "ui/views/background.h" | 14 #include "ui/views/background.h" |
16 #include "ui/views/controls/textfield/textfield.h" | 15 #include "ui/views/controls/textfield/textfield.h" |
17 #include "ui/views/widget/widget_delegate.h" | 16 #include "ui/views/widget/widget_delegate.h" |
18 | 17 |
19 namespace mandoline { | 18 namespace mandoline { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 122 |
124 //////////////////////////////////////////////////////////////////////////////// | 123 //////////////////////////////////////////////////////////////////////////////// |
125 // OmniboxImpl, Omnibox implementation: | 124 // OmniboxImpl, Omnibox implementation: |
126 | 125 |
127 void OmniboxImpl::SetClient(OmniboxClientPtr client) { | 126 void OmniboxImpl::SetClient(OmniboxClientPtr client) { |
128 client_ = client.Pass(); | 127 client_ = client.Pass(); |
129 } | 128 } |
130 | 129 |
131 void OmniboxImpl::ShowForURL(const mojo::String& url) { | 130 void OmniboxImpl::ShowForURL(const mojo::String& url) { |
132 url_ = url; | 131 url_ = url; |
133 mojo::WindowManagerPtr window_manager; | 132 // TODO: get embedding working. |
134 app_impl_->ConnectToService("mojo:window_manager", &window_manager); | |
135 window_manager->Embed("mojo:omnibox", nullptr, nullptr); | |
136 } | 133 } |
137 | 134 |
138 } // namespace mandoline | 135 } // namespace mandoline |
OLD | NEW |