| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 manager_(manager), | 105 manager_(manager), |
| 106 toolbar_view_(nullptr), | 106 toolbar_view_(nullptr), |
| 107 progress_bar_(nullptr), | 107 progress_bar_(nullptr), |
| 108 find_bar_view_(nullptr), | 108 find_bar_view_(nullptr), |
| 109 root_(nullptr), | 109 root_(nullptr), |
| 110 content_(nullptr), | 110 content_(nullptr), |
| 111 omnibox_view_(nullptr), | 111 omnibox_view_(nullptr), |
| 112 find_active_(0), | 112 find_active_(0), |
| 113 find_count_(0), | 113 find_count_(0), |
| 114 web_view_(this) { | 114 web_view_(this) { |
| 115 mus::mojom::WindowTreeHostClientPtr host_client; | 115 mus::CreateWindowTreeHost(host_factory, |
| 116 host_client_binding_.Bind(GetProxy(&host_client)); | 116 host_client_binding_.CreateInterfacePtrAndBind(), |
| 117 mus::CreateWindowTreeHost(host_factory, std::move(host_client), this, &host_, | 117 this, &host_, nullptr, nullptr); |
| 118 nullptr, nullptr); | |
| 119 } | 118 } |
| 120 | 119 |
| 121 void BrowserWindow::LoadURL(const GURL& url) { | 120 void BrowserWindow::LoadURL(const GURL& url) { |
| 122 // Haven't been embedded yet, can't embed. | 121 // Haven't been embedded yet, can't embed. |
| 123 // TODO(beng): remove this. | 122 // TODO(beng): remove this. |
| 124 if (!root_) { | 123 if (!root_) { |
| 125 default_url_ = url; | 124 default_url_ = url; |
| 126 return; | 125 return; |
| 127 } | 126 } |
| 128 | 127 |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 content_bounds.set_width(DIPSToPixels(progress_bar_bounds.width())); | 450 content_bounds.set_width(DIPSToPixels(progress_bar_bounds.width())); |
| 452 content_bounds.set_height(host->bounds().height() - content_bounds.y() - | 451 content_bounds.set_height(host->bounds().height() - content_bounds.y() - |
| 453 DIPSToPixels(10)); | 452 DIPSToPixels(10)); |
| 454 content_->SetBounds(content_bounds); | 453 content_->SetBounds(content_bounds); |
| 455 | 454 |
| 456 // The omnibox view bounds are in physical pixels. | 455 // The omnibox view bounds are in physical pixels. |
| 457 omnibox_view_->SetBounds(bounds_in_physical_pixels); | 456 omnibox_view_->SetBounds(bounds_in_physical_pixels); |
| 458 } | 457 } |
| 459 | 458 |
| 460 } // namespace mandoline | 459 } // namespace mandoline |
| OLD | NEW |