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

Side by Side Diff: mandoline/ui/desktop_ui/browser_window.cc

Issue 1681813002: Rename Connection::AddService/ConnectToService to Connection::AddInterface/GetInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_binder
Patch Set: . Created 4 years, 10 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/desktop_ui/browser_manager.cc ('k') | mandoline/ui/omnibox/omnibox_application.cc » ('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/desktop_ui/browser_window.h" 5 #include "mandoline/ui/desktop_ui/browser_window.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 if (root_) 145 if (root_)
146 mus::ScopedWindowPtr::DeleteWindowOrWindowManager(root_); 146 mus::ScopedWindowPtr::DeleteWindowOrWindowManager(root_);
147 else 147 else
148 delete this; 148 delete this;
149 } 149 }
150 150
151 void BrowserWindow::ShowOmnibox() { 151 void BrowserWindow::ShowOmnibox() {
152 TRACE_EVENT0("desktop_ui", "BrowserWindow::ShowOmnibox"); 152 TRACE_EVENT0("desktop_ui", "BrowserWindow::ShowOmnibox");
153 if (!omnibox_.get()) { 153 if (!omnibox_.get()) {
154 omnibox_connection_ = shell_->Connect("mojo:omnibox"); 154 omnibox_connection_ = shell_->Connect("mojo:omnibox");
155 omnibox_connection_->AddService<ViewEmbedder>(this); 155 omnibox_connection_->AddInterface<ViewEmbedder>(this);
156 omnibox_connection_->ConnectToService(&omnibox_); 156 omnibox_connection_->GetInterface(&omnibox_);
157 omnibox_connection_->SetRemoteServiceProviderConnectionErrorHandler( 157 omnibox_connection_->SetRemoteServiceProviderConnectionErrorHandler(
158 [this]() { 158 [this]() {
159 // This will cause the connection to be re-established the next time 159 // This will cause the connection to be re-established the next time
160 // we come through this codepath. 160 // we come through this codepath.
161 omnibox_.reset(); 161 omnibox_.reset();
162 }); 162 });
163 } 163 }
164 omnibox_->ShowForURL(mojo::String::From(current_url_.spec())); 164 omnibox_->ShowForURL(mojo::String::From(current_url_.spec()));
165 } 165 }
166 166
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 content_bounds.set_width(DIPSToPixels(progress_bar_bounds.width())); 483 content_bounds.set_width(DIPSToPixels(progress_bar_bounds.width()));
484 content_bounds.set_height(host->bounds().height() - content_bounds.y() - 484 content_bounds.set_height(host->bounds().height() - content_bounds.y() -
485 DIPSToPixels(10)); 485 DIPSToPixels(10));
486 content_->SetBounds(content_bounds); 486 content_->SetBounds(content_bounds);
487 487
488 // The omnibox view bounds are in physical pixels. 488 // The omnibox view bounds are in physical pixels.
489 omnibox_view_->SetBounds(bounds_in_physical_pixels); 489 omnibox_view_->SetBounds(bounds_in_physical_pixels);
490 } 490 }
491 491
492 } // namespace mandoline 492 } // namespace mandoline
OLDNEW
« no previous file with comments | « mandoline/ui/desktop_ui/browser_manager.cc ('k') | mandoline/ui/omnibox/omnibox_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698