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

Side by Side Diff: components/web_view/navigation_controller.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 12 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
« no previous file with comments | « components/web_view/local_find_options.cc ('k') | components/web_view/navigation_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/navigation_controller.h" 5 #include "components/web_view/navigation_controller.h"
6 6
7 #include <utility>
8
7 #include "components/web_view/frame.h" 9 #include "components/web_view/frame.h"
8 #include "components/web_view/navigation_controller_delegate.h" 10 #include "components/web_view/navigation_controller_delegate.h"
9 #include "components/web_view/navigation_entry.h" 11 #include "components/web_view/navigation_entry.h"
10 #include "components/web_view/reload_type.h" 12 #include "components/web_view/reload_type.h"
11 13
12 namespace web_view { 14 namespace web_view {
13 15
14 NavigationController::NavigationController( 16 NavigationController::NavigationController(
15 NavigationControllerDelegate* delegate) 17 NavigationControllerDelegate* delegate)
16 : pending_entry_(nullptr), 18 : pending_entry_(nullptr),
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 DiscardPendingEntry(false); 94 DiscardPendingEntry(false);
93 95
94 pending_entry_index_ = current_index + 1; 96 pending_entry_index_ = current_index + 1;
95 // TODO(erg): Transition type handled here. 97 // TODO(erg): Transition type handled here.
96 NavigateToPendingEntry(ReloadType::NO_RELOAD, true); 98 NavigateToPendingEntry(ReloadType::NO_RELOAD, true);
97 } 99 }
98 100
99 void NavigationController::LoadURL(mojo::URLRequestPtr request) { 101 void NavigationController::LoadURL(mojo::URLRequestPtr request) {
100 // TODO(erg): This mimics part of NavigationControllerImpl::LoadURL(), minus 102 // TODO(erg): This mimics part of NavigationControllerImpl::LoadURL(), minus
101 // all the error checking. 103 // all the error checking.
102 SetPendingEntry(make_scoped_ptr(new NavigationEntry(request.Pass()))); 104 SetPendingEntry(make_scoped_ptr(new NavigationEntry(std::move(request))));
103 NavigateToPendingEntry(ReloadType::NO_RELOAD, false); 105 NavigateToPendingEntry(ReloadType::NO_RELOAD, false);
104 } 106 }
105 107
106 void NavigationController::NavigateToPendingEntry( 108 void NavigationController::NavigateToPendingEntry(
107 ReloadType reload_type, 109 ReloadType reload_type,
108 bool update_navigation_start_time) { 110 bool update_navigation_start_time) {
109 // TODO(erg): Deal with session history navigations while trying to navigate 111 // TODO(erg): Deal with session history navigations while trying to navigate
110 // to a slow-to-commit page. 112 // to a slow-to-commit page.
111 113
112 // TODO(erg): Deal with interstitials. 114 // TODO(erg): Deal with interstitials.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 int current_size = static_cast<int>(entries_.size()); 205 int current_size = static_cast<int>(entries_.size());
204 if (current_size > 0) { 206 if (current_size > 0) {
205 while (last_committed_entry_index_ < (current_size - 1)) { 207 while (last_committed_entry_index_ < (current_size - 1)) {
206 entries_.pop_back(); 208 entries_.pop_back();
207 current_size--; 209 current_size--;
208 } 210 }
209 } 211 }
210 } 212 }
211 213
212 } // namespace web_view 214 } // namespace web_view
OLDNEW
« no previous file with comments | « components/web_view/local_find_options.cc ('k') | components/web_view/navigation_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698