| 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/desktop_ui/browser_window.h" | 5 #include "mandoline/ui/desktop_ui/browser_window.h" |
| 6 | 6 |
| 7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "mandoline/ui/aura/native_widget_view_manager.h" | 9 #include "mandoline/ui/aura/native_widget_view_manager.h" |
| 10 #include "mandoline/ui/desktop_ui/browser_manager.h" | 10 #include "mandoline/ui/desktop_ui/browser_manager.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 [this]() { | 261 [this]() { |
| 262 // This will cause the connection to be re-established the next time | 262 // This will cause the connection to be re-established the next time |
| 263 // we come through this codepath. | 263 // we come through this codepath. |
| 264 omnibox_.reset(); | 264 omnibox_.reset(); |
| 265 }); | 265 }); |
| 266 } | 266 } |
| 267 omnibox_->ShowForURL(mojo::String::From(current_url_.spec())); | 267 omnibox_->ShowForURL(mojo::String::From(current_url_.spec())); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void BrowserWindow::EmbedOmnibox(mojo::ApplicationConnection* connection) { | 270 void BrowserWindow::EmbedOmnibox(mojo::ApplicationConnection* connection) { |
| 271 mojo::ViewManagerClientPtr view_manager_client; | 271 mojo::ViewTreeClientPtr view_tree_client; |
| 272 connection->ConnectToService(&view_manager_client); | 272 connection->ConnectToService(&view_tree_client); |
| 273 omnibox_view_->Embed(view_manager_client.Pass()); | 273 omnibox_view_->Embed(view_tree_client.Pass()); |
| 274 | 274 |
| 275 // TODO(beng): This should be handled sufficiently by | 275 // TODO(beng): This should be handled sufficiently by |
| 276 // OmniboxImpl::ShowWindow() but unfortunately view manager policy | 276 // OmniboxImpl::ShowWindow() but unfortunately view manager policy |
| 277 // currently prevents the embedded app from changing window z for | 277 // currently prevents the embedded app from changing window z for |
| 278 // its own window. | 278 // its own window. |
| 279 omnibox_view_->MoveToFront(); | 279 omnibox_view_->MoveToFront(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 } // namespace mandoline | 282 } // namespace mandoline |
| OLD | NEW |