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

Side by Side Diff: ios/web/navigation/navigation_manager_impl.mm

Issue 2742953003: created web::ReloadType (Closed)
Patch Set: Rebase Created 3 years, 9 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 | « ios/web/navigation/navigation_manager_impl.h ('k') | ios/web/public/navigation_manager.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #import "ios/web/navigation/navigation_manager_impl.h" 5 #import "ios/web/navigation/navigation_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #import "ios/web/navigation/crw_session_controller+private_constructors.h" 12 #import "ios/web/navigation/crw_session_controller+private_constructors.h"
13 #import "ios/web/navigation/crw_session_controller.h" 13 #import "ios/web/navigation/crw_session_controller.h"
14 #import "ios/web/navigation/navigation_item_impl.h" 14 #import "ios/web/navigation/navigation_item_impl.h"
15 #import "ios/web/navigation/navigation_item_impl_list.h" 15 #import "ios/web/navigation/navigation_item_impl_list.h"
16 #import "ios/web/navigation/navigation_manager_delegate.h" 16 #import "ios/web/navigation/navigation_manager_delegate.h"
17 #include "ios/web/navigation/navigation_manager_facade_delegate.h" 17 #include "ios/web/navigation/navigation_manager_facade_delegate.h"
18 #include "ios/web/public/load_committed_details.h" 18 #include "ios/web/public/load_committed_details.h"
19 #import "ios/web/public/navigation_item.h" 19 #import "ios/web/public/navigation_item.h"
20 #include "ios/web/public/reload_type.h"
20 #import "ios/web/public/web_client.h" 21 #import "ios/web/public/web_client.h"
21 #import "ios/web/public/web_state/web_state.h" 22 #import "ios/web/public/web_state/web_state.h"
22 #include "ui/base/page_transition_types.h" 23 #include "ui/base/page_transition_types.h"
23 24
24 #if !defined(__has_feature) || !__has_feature(objc_arc) 25 #if !defined(__has_feature) || !__has_feature(objc_arc)
25 #error "This file requires ARC support." 26 #error "This file requires ARC support."
26 #endif 27 #endif
27 28
28 namespace { 29 namespace {
29 30
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 331 }
331 332
332 void NavigationManagerImpl::GoForward() { 333 void NavigationManagerImpl::GoForward() {
333 delegate_->GoToIndex(GetIndexForOffset(1)); 334 delegate_->GoToIndex(GetIndexForOffset(1));
334 } 335 }
335 336
336 void NavigationManagerImpl::GoToIndex(int index) { 337 void NavigationManagerImpl::GoToIndex(int index) {
337 delegate_->GoToIndex(index); 338 delegate_->GoToIndex(index);
338 } 339 }
339 340
340 void NavigationManagerImpl::Reload(bool check_for_reposts) { 341 void NavigationManagerImpl::Reload(ReloadType reload_type,
342 bool check_for_reposts) {
341 // Navigation manager may be empty if the only pending item failed to load 343 // Navigation manager may be empty if the only pending item failed to load
342 // with SSL error and the user has decided not to proceed. 344 // with SSL error and the user has decided not to proceed.
343 NavigationItem* item = GetVisibleItem(); 345 NavigationItem* item = GetVisibleItem();
344 GURL url = item ? item->GetURL() : GURL(url::kAboutBlankURL); 346 GURL url = item ? item->GetURL() : GURL(url::kAboutBlankURL);
345 web::Referrer referrer = item ? item->GetReferrer() : web::Referrer(); 347 web::Referrer referrer = item ? item->GetReferrer() : web::Referrer();
346 348
347 WebState::OpenURLParams params(url, referrer, 349 WebState::OpenURLParams params(url, referrer,
348 WindowOpenDisposition::CURRENT_TAB, 350 WindowOpenDisposition::CURRENT_TAB,
349 ui::PAGE_TRANSITION_RELOAD, NO); 351 ui::PAGE_TRANSITION_RELOAD, NO);
350 delegate_->GetWebState()->OpenURL(params); 352 delegate_->GetWebState()->OpenURL(params);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 const ScopedNavigationItemImplList& items = [session_controller_ items]; 447 const ScopedNavigationItemImplList& items = [session_controller_ items];
446 while (index >= 0) { 448 while (index >= 0) {
447 NavigationItem* item = items[index--].get(); 449 NavigationItem* item = items[index--].get();
448 if (!client->IsAppSpecificURL(item->GetVirtualURL())) 450 if (!client->IsAppSpecificURL(item->GetVirtualURL()))
449 return item; 451 return item;
450 } 452 }
451 return nullptr; 453 return nullptr;
452 } 454 }
453 455
454 } // namespace web 456 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.h ('k') | ios/web/public/navigation_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698