| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 //////////////////////////////////////////////////////////////////////////////// | 297 //////////////////////////////////////////////////////////////////////////////// |
| 298 // BrowserWindow, web_view::mojom::WebViewClient implementation: | 298 // BrowserWindow, web_view::mojom::WebViewClient implementation: |
| 299 | 299 |
| 300 void BrowserWindow::TopLevelNavigateRequest(mojo::URLRequestPtr request) { | 300 void BrowserWindow::TopLevelNavigateRequest(mojo::URLRequestPtr request) { |
| 301 OnHideFindBar(); | 301 OnHideFindBar(); |
| 302 Embed(std::move(request)); | 302 Embed(std::move(request)); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void BrowserWindow::TopLevelNavigationStarted(const mojo::String& url) { | 305 void BrowserWindow::TopLevelNavigationStarted(const mojo::String& url) { |
| 306 GURL gurl(url); | 306 GURL gurl(url.get()); |
| 307 bool changed = current_url_ != gurl; | 307 bool changed = current_url_ != gurl; |
| 308 current_url_ = gurl; | 308 current_url_ = gurl; |
| 309 if (changed) | 309 if (changed) |
| 310 toolbar_view_->SetOmniboxText(base::UTF8ToUTF16(current_url_.spec())); | 310 toolbar_view_->SetOmniboxText(base::UTF8ToUTF16(current_url_.spec())); |
| 311 } | 311 } |
| 312 | 312 |
| 313 void BrowserWindow::LoadingStateChanged(bool is_loading, double progress) { | 313 void BrowserWindow::LoadingStateChanged(bool is_loading, double progress) { |
| 314 progress_bar_->SetIsLoading(is_loading); | 314 progress_bar_->SetIsLoading(is_loading); |
| 315 progress_bar_->SetProgress(progress); | 315 progress_bar_->SetProgress(progress); |
| 316 } | 316 } |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 content_bounds.set_width(DIPSToPixels(progress_bar_bounds.width())); | 451 content_bounds.set_width(DIPSToPixels(progress_bar_bounds.width())); |
| 452 content_bounds.set_height(host->bounds().height() - content_bounds.y() - | 452 content_bounds.set_height(host->bounds().height() - content_bounds.y() - |
| 453 DIPSToPixels(10)); | 453 DIPSToPixels(10)); |
| 454 content_->SetBounds(content_bounds); | 454 content_->SetBounds(content_bounds); |
| 455 | 455 |
| 456 // The omnibox view bounds are in physical pixels. | 456 // The omnibox view bounds are in physical pixels. |
| 457 omnibox_view_->SetBounds(bounds_in_physical_pixels); | 457 omnibox_view_->SetBounds(bounds_in_physical_pixels); |
| 458 } | 458 } |
| 459 | 459 |
| 460 } // namespace mandoline | 460 } // namespace mandoline |
| OLD | NEW |