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

Side by Side Diff: ios/chrome/browser/web/auto_reload_bridge.mm

Issue 2826593003: Fix reload in AutoReload (Closed)
Patch Set: Created 3 years, 8 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/chrome/browser/web/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ios/chrome/browser/web/auto_reload_bridge.h" 5 #include "ios/chrome/browser/web/auto_reload_bridge.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/ios/weak_nsobject.h" 9 #include "base/ios/weak_nsobject.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #import "ios/chrome/browser/tabs/tab.h"
12 #import "ios/web/public/navigation_manager.h"
11 #include "net/base/network_change_notifier.h" 13 #include "net/base/network_change_notifier.h"
12 14
13 namespace { 15 namespace {
14 class NetworkChangeObserverBridge; 16 class NetworkChangeObserverBridge;
15 } // namespace 17 } // namespace
16 18
17 @interface AutoReloadBridge () { 19 @interface AutoReloadBridge () {
18 base::WeakNSObject<Tab> _tab; 20 base::WeakNSObject<Tab> _tab;
19 base::scoped_nsobject<AutoReloadController> _controller; 21 base::scoped_nsobject<AutoReloadController> _controller;
20 std::unique_ptr<NetworkChangeObserverBridge> _networkBridge; 22 std::unique_ptr<NetworkChangeObserverBridge> _networkBridge;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 [_controller loadFailedForURL:url wasPost:wasPost]; 75 [_controller loadFailedForURL:url wasPost:wasPost];
74 } 76 }
75 77
76 - (void)networkStateChangedToOnline:(BOOL)online { 78 - (void)networkStateChangedToOnline:(BOOL)online {
77 [_controller networkStateChangedToOnline:online]; 79 [_controller networkStateChangedToOnline:online];
78 } 80 }
79 81
80 #pragma mark AutoReloadDelegate methods 82 #pragma mark AutoReloadDelegate methods
81 83
82 - (void)reload { 84 - (void)reload {
83 [_tab reload]; 85 [_tab navigationManager]->Reload(web::ReloadType::NORMAL,
86 false /* check_for_repost */);
84 } 87 }
85 88
86 @end 89 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698