| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 if (string_url == "mojo:omnibox") { | 384 if (string_url == "mojo:omnibox") { |
| 385 EmbedOmnibox(); | 385 EmbedOmnibox(); |
| 386 return; | 386 return; |
| 387 } | 387 } |
| 388 web_view_.web_view()->LoadRequest(std::move(request)); | 388 web_view_.web_view()->LoadRequest(std::move(request)); |
| 389 } | 389 } |
| 390 | 390 |
| 391 //////////////////////////////////////////////////////////////////////////////// | 391 //////////////////////////////////////////////////////////////////////////////// |
| 392 // BrowserWindow, mojo::InterfaceFactory<ViewEmbedder> implementation: | 392 // BrowserWindow, mojo::InterfaceFactory<ViewEmbedder> implementation: |
| 393 | 393 |
| 394 void BrowserWindow::Create(mojo::ApplicationConnection* connection, | 394 void BrowserWindow::Create(mojo::Connection* connection, |
| 395 mojo::InterfaceRequest<ViewEmbedder> request) { | 395 mojo::InterfaceRequest<ViewEmbedder> request) { |
| 396 view_embedder_bindings_.AddBinding(this, std::move(request)); | 396 view_embedder_bindings_.AddBinding(this, std::move(request)); |
| 397 } | 397 } |
| 398 | 398 |
| 399 //////////////////////////////////////////////////////////////////////////////// | 399 //////////////////////////////////////////////////////////////////////////////// |
| 400 // BrowserWindow, FindBarDelegate implementation: | 400 // BrowserWindow, FindBarDelegate implementation: |
| 401 | 401 |
| 402 void BrowserWindow::OnDoFind(const std::string& find, bool forward) { | 402 void BrowserWindow::OnDoFind(const std::string& find, bool forward) { |
| 403 web_view_.web_view()->Find(mojo::String::From(find), forward); | 403 web_view_.web_view()->Find(mojo::String::From(find), forward); |
| 404 } | 404 } |
| (...skipping 78 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 |