Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Side by Side Diff: mandoline/ui/omnibox/omnibox_impl.cc

Issue 1166123005: Removes ServiceProviders from ViewManager::Embed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use is_headless rather than check for browser. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mandoline/ui/omnibox/omnibox_impl.h ('k') | mojo/application/public/cpp/lazy_interface_ptr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "mandoline/ui/aura/aura_init.h" 9 #include "mandoline/ui/aura/aura_init.h"
10 #include "mandoline/ui/aura/native_widget_view_manager.h" 10 #include "mandoline/ui/aura/native_widget_view_manager.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 bool OmniboxImpl::ConfigureOutgoingConnection( 46 bool OmniboxImpl::ConfigureOutgoingConnection(
47 mojo::ApplicationConnection* connection) { 47 mojo::ApplicationConnection* connection) {
48 return true; 48 return true;
49 } 49 }
50 50
51 //////////////////////////////////////////////////////////////////////////////// 51 ////////////////////////////////////////////////////////////////////////////////
52 // OmniboxImpl, mojo::ViewManagerDelegate implementation: 52 // OmniboxImpl, mojo::ViewManagerDelegate implementation:
53 53
54 void OmniboxImpl::OnEmbed(mojo::View* root, 54 void OmniboxImpl::OnEmbed(mojo::View* root) {
55 mojo::InterfaceRequest<mojo::ServiceProvider> services,
56 mojo::ServiceProviderPtr exposed_services) {
57 if (!aura_init_.get()) { 55 if (!aura_init_.get()) {
58 aura_init_.reset(new AuraInit(app_impl_->shell())); 56 aura_init_.reset(new AuraInit(app_impl_->shell()));
59 edit_ = new views::Textfield; 57 edit_ = new views::Textfield;
60 edit_->set_controller(this); 58 edit_->set_controller(this);
61 } 59 }
62 60
63 const int kOpacity = 0xC0; 61 const int kOpacity = 0xC0;
64 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView; 62 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView;
65 widget_delegate->GetContentsView()->set_background( 63 widget_delegate->GetContentsView()->set_background(
66 views::Background::CreateSolidBackground( 64 views::Background::CreateSolidBackground(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // OmniboxImpl, Omnibox implementation: 129 // OmniboxImpl, Omnibox implementation:
132 130
133 void OmniboxImpl::SetClient(OmniboxClientPtr client) { 131 void OmniboxImpl::SetClient(OmniboxClientPtr client) {
134 client_ = client.Pass(); 132 client_ = client.Pass();
135 } 133 }
136 134
137 void OmniboxImpl::ShowForURL(const mojo::String& url) { 135 void OmniboxImpl::ShowForURL(const mojo::String& url) {
138 url_ = url; 136 url_ = url;
139 mojo::URLRequestPtr request(mojo::URLRequest::New()); 137 mojo::URLRequestPtr request(mojo::URLRequest::New());
140 request->url = mojo::String::From("mojo:omnibox"); 138 request->url = mojo::String::From("mojo:omnibox");
141 view_embedder_->Embed(request.Pass(), nullptr, nullptr); 139 view_embedder_->Embed(request.Pass());
142 } 140 }
143 141
144 } // namespace mandoline 142 } // namespace mandoline
OLDNEW
« no previous file with comments | « mandoline/ui/omnibox/omnibox_impl.h ('k') | mojo/application/public/cpp/lazy_interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698