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

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

Issue 2957163002: [Navigation Experiment] Add WKBasedNavigationManagerImpl. (Closed)
Patch Set: Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/legacy_navigation_manager_impl.h" 5 #import "ios/web/navigation/legacy_navigation_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 22 matching lines...) Expand all
33 if (existing_url == new_url || !new_url.has_ref()) 33 if (existing_url == new_url || !new_url.has_ref())
34 return false; 34 return false;
35 35
36 return existing_url.EqualsIgnoringRef(new_url); 36 return existing_url.EqualsIgnoringRef(new_url);
37 } 37 }
38 38
39 } // anonymous namespace 39 } // anonymous namespace
40 40
41 namespace web { 41 namespace web {
42 42
43 NavigationManager::WebLoadParams::WebLoadParams(const GURL& url)
44 : url(url),
45 transition_type(ui::PAGE_TRANSITION_LINK),
46 user_agent_override_option(UserAgentOverrideOption::INHERIT),
47 is_renderer_initiated(false),
48 post_data(nil) {}
49
50 NavigationManager::WebLoadParams::~WebLoadParams() {}
51
52 NavigationManager::WebLoadParams::WebLoadParams(const WebLoadParams& other)
53 : url(other.url),
54 referrer(other.referrer),
55 transition_type(other.transition_type),
56 user_agent_override_option(other.user_agent_override_option),
57 is_renderer_initiated(other.is_renderer_initiated),
58 extra_headers([other.extra_headers copy]),
59 post_data([other.post_data copy]) {}
60
61 NavigationManager::WebLoadParams& NavigationManager::WebLoadParams::operator=(
62 const WebLoadParams& other) {
63 url = other.url;
64 referrer = other.referrer;
65 is_renderer_initiated = other.is_renderer_initiated;
66 transition_type = other.transition_type;
67 user_agent_override_option = other.user_agent_override_option;
68 extra_headers.reset([other.extra_headers copy]);
69 post_data.reset([other.post_data copy]);
70
71 return *this;
72 }
73
74 LegacyNavigationManagerImpl::LegacyNavigationManagerImpl() 43 LegacyNavigationManagerImpl::LegacyNavigationManagerImpl()
75 : delegate_(nullptr), browser_state_(nullptr) {} 44 : delegate_(nullptr), browser_state_(nullptr) {}
76 45
77 LegacyNavigationManagerImpl::~LegacyNavigationManagerImpl() { 46 LegacyNavigationManagerImpl::~LegacyNavigationManagerImpl() {
78 [session_controller_ setNavigationManager:nullptr]; 47 [session_controller_ setNavigationManager:nullptr];
79 } 48 }
80 49
81 void LegacyNavigationManagerImpl::SetDelegate( 50 void LegacyNavigationManagerImpl::SetDelegate(
82 NavigationManagerDelegate* delegate) { 51 NavigationManagerDelegate* delegate) {
83 delegate_ = delegate; 52 delegate_ = delegate;
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 return item; 423 return item;
455 } 424 }
456 return nullptr; 425 return nullptr;
457 } 426 }
458 427
459 int LegacyNavigationManagerImpl::GetPreviousItemIndex() const { 428 int LegacyNavigationManagerImpl::GetPreviousItemIndex() const {
460 return base::checked_cast<int>([session_controller_ previousItemIndex]); 429 return base::checked_cast<int>([session_controller_ previousItemIndex]);
461 } 430 }
462 431
463 } // namespace web 432 } // namespace web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698