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

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

Issue 2957163002: [Navigation Experiment] Add WKBasedNavigationManagerImpl. (Closed)
Patch Set: Patch for landing 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "ios/web/navigation/navigation_manager_impl.h"
6
7 #include "ui/base/page_transition_types.h"
8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
13 namespace web {
14
15 NavigationManager::WebLoadParams::WebLoadParams(const GURL& url)
16 : url(url),
17 transition_type(ui::PAGE_TRANSITION_LINK),
18 user_agent_override_option(UserAgentOverrideOption::INHERIT),
19 is_renderer_initiated(false),
20 post_data(nil) {}
21
22 NavigationManager::WebLoadParams::~WebLoadParams() {}
23
24 NavigationManager::WebLoadParams::WebLoadParams(const WebLoadParams& other)
25 : url(other.url),
26 referrer(other.referrer),
27 transition_type(other.transition_type),
28 user_agent_override_option(other.user_agent_override_option),
29 is_renderer_initiated(other.is_renderer_initiated),
30 extra_headers([other.extra_headers copy]),
31 post_data([other.post_data copy]) {}
32
33 NavigationManager::WebLoadParams& NavigationManager::WebLoadParams::operator=(
34 const WebLoadParams& other) {
35 url = other.url;
36 referrer = other.referrer;
37 is_renderer_initiated = other.is_renderer_initiated;
38 transition_type = other.transition_type;
39 user_agent_override_option = other.user_agent_override_option;
40 extra_headers.reset([other.extra_headers copy]);
41 post_data.reset([other.post_data copy]);
42
43 return *this;
44 }
45
46 /* static */
47 bool NavigationManagerImpl::AreUrlsFragmentChangeNavigation(
48 const GURL& existing_url,
49 const GURL& new_url) {
50 if (existing_url == new_url || !new_url.has_ref())
51 return false;
52
53 return existing_url.EqualsIgnoringRef(new_url);
54 }
55
56 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.h ('k') | ios/web/navigation/navigation_manager_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698