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

Side by Side Diff: components/web_view/frame.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 "components/web_view/frame.h" 5 #include "components/web_view/frame.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 if (!window_) { 355 if (!window_) {
356 pending_navigate_ = std::move(request); 356 pending_navigate_ = std::move(request);
357 return; 357 return;
358 } 358 }
359 359
360 // Drop any pending navigation requests. 360 // Drop any pending navigation requests.
361 navigate_weak_ptr_factory_.InvalidateWeakPtrs(); 361 navigate_weak_ptr_factory_.InvalidateWeakPtrs();
362 362
363 DVLOG(2) << "Frame::StartNavigate id=" << id_ << " url=" << request->url; 363 DVLOG(2) << "Frame::StartNavigate id=" << id_ << " url=" << request->url;
364 364
365 const GURL requested_url(request->url); 365 const GURL requested_url(request->url.get());
366 base::TimeTicks navigation_start_time = 366 base::TimeTicks navigation_start_time =
367 base::TimeTicks::FromInternalValue(request->originating_time_ticks); 367 base::TimeTicks::FromInternalValue(request->originating_time_ticks);
368 tree_->delegate_->CanNavigateFrame( 368 tree_->delegate_->CanNavigateFrame(
369 this, std::move(request), 369 this, std::move(request),
370 base::Bind(&Frame::OnCanNavigateFrame, 370 base::Bind(&Frame::OnCanNavigateFrame,
371 navigate_weak_ptr_factory_.GetWeakPtr(), requested_url, 371 navigate_weak_ptr_factory_.GetWeakPtr(), requested_url,
372 navigation_start_time)); 372 navigation_start_time));
373 } 373 }
374 374
375 void Frame::OnCanNavigateFrame( 375 void Frame::OnCanNavigateFrame(
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 final_update); 600 final_update);
601 } 601 }
602 602
603 void Frame::OnFindInPageSelectionUpdated(int32_t request_id, 603 void Frame::OnFindInPageSelectionUpdated(int32_t request_id,
604 int32_t active_match_ordinal) { 604 int32_t active_match_ordinal) {
605 tree_->delegate_->OnFindInPageSelectionUpdated(request_id, this, 605 tree_->delegate_->OnFindInPageSelectionUpdated(request_id, this,
606 active_match_ordinal); 606 active_match_ordinal);
607 } 607 }
608 608
609 } // namespace web_view 609 } // namespace web_view
OLDNEW
« no previous file with comments | « components/html_viewer/web_url_loader_impl.cc ('k') | components/web_view/pending_web_view_load.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698