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

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

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « mandoline/ui/desktop_ui/browser_manager.cc ('k') | media/blink/encrypted_media_player_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698