| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_->AddInterface<ViewEmbedder>(this); | 155 omnibox_connection_->AddInterface<ViewEmbedder>(this); |
| 156 omnibox_connection_->GetInterface(&omnibox_); | 156 omnibox_connection_->GetInterface(&omnibox_); |
| 157 omnibox_connection_->SetRemoteServiceProviderConnectionErrorHandler( | 157 omnibox_connection_->SetRemoteInterfaceProviderConnectionErrorHandler( |
| 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 |
| 167 void BrowserWindow::ShowFind() { | 167 void BrowserWindow::ShowFind() { |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |