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

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

Issue 1390353007: Adds MUSViewsInit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows Created 5 years, 2 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 | « components/web_view/web_view_impl.cc ('k') | ui/views/views_delegate.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_application.h" 5 #include "mandoline/ui/omnibox/omnibox_application.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 "components/mus/public/cpp/view_tree_connection.h" 9 #include "components/mus/public/cpp/view_tree_connection.h"
10 #include "components/mus/public/cpp/view_tree_delegate.h" 10 #include "components/mus/public/cpp/view_tree_delegate.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return true; 183 return true;
184 } 184 }
185 return false; 185 return false;
186 } 186 }
187 187
188 //////////////////////////////////////////////////////////////////////////////// 188 ////////////////////////////////////////////////////////////////////////////////
189 // OmniboxImpl, Omnibox implementation: 189 // OmniboxImpl, Omnibox implementation:
190 190
191 void OmniboxImpl::GetViewTreeClient( 191 void OmniboxImpl::GetViewTreeClient(
192 mojo::InterfaceRequest<mojo::ViewTreeClient> request) { 192 mojo::InterfaceRequest<mojo::ViewTreeClient> request) {
193 mus::ViewTreeConnection::Create(this, request.Pass()); 193 mus::ViewTreeConnection::Create(
194 this, request.Pass(),
195 mus::ViewTreeConnection::CreateType::DONT_WAIT_FOR_EMBED);
194 } 196 }
195 197
196 void OmniboxImpl::ShowForURL(const mojo::String& url) { 198 void OmniboxImpl::ShowForURL(const mojo::String& url) {
197 url_ = url; 199 url_ = url;
198 if (root_) { 200 if (root_) {
199 ShowWindow(); 201 ShowWindow();
200 } else { 202 } else {
201 mojo::URLRequestPtr request(mojo::URLRequest::New()); 203 mojo::URLRequestPtr request(mojo::URLRequest::New());
202 request->url = mojo::String::From("mojo:omnibox"); 204 request->url = mojo::String::From("mojo:omnibox");
203 view_embedder_->Embed(request.Pass()); 205 view_embedder_->Embed(request.Pass());
(...skipping 12 matching lines...) Expand all
216 edit_->SelectAll(false); 218 edit_->SelectAll(false);
217 edit_->RequestFocus(); 219 edit_->RequestFocus();
218 } 220 }
219 221
220 void OmniboxImpl::HideWindow() { 222 void OmniboxImpl::HideWindow() {
221 DCHECK(root_); 223 DCHECK(root_);
222 root_->SetVisible(false); 224 root_->SetVisible(false);
223 } 225 }
224 226
225 } // namespace mandoline 227 } // namespace mandoline
OLDNEW
« no previous file with comments | « components/web_view/web_view_impl.cc ('k') | ui/views/views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698