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

Side by Side Diff: content/test/test_navigation_handle.h

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Addressed comments Created 5 years, 3 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 2015 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 #ifndef CONTENT_TEST_TEST_NAVIGATION_HANDLE_H_
6 #define CONTENT_TEST_TEST_NAVIGATION_HANDLE_H_
7
8 #include <string>
9
10 #include "content/browser/frame_host/navigation_handle_impl.h"
11 #include "content/public/test/navigation_handle_tester.h"
12
13 namespace content {
14
15 // A test version of the NavigationHandle that can be used to simulate various
16 // navigation calls by embedders of content/.
17 class TestNavigationHandle : public NavigationHandleImpl,
18 public NavigationHandleTester {
19 public:
20 ~TestNavigationHandle() override;
21
22 static TestNavigationHandle* Create(const GURL& url,
23 const bool is_main_frame,
24 NavigatorDelegate* delegate);
25
26 // NavigationHandlerTester implementation.
27 NavigationThrottle::ThrottleCheckResult SimulateWillStartRequest(
28 bool is_post,
29 const Referrer& sanitized_referrer,
30 bool has_user_gesture,
31 ui::PageTransition transition,
32 bool is_external_protocol) override;
33 NavigationThrottle::ThrottleCheckResult SimulateWillRedirectRequest(
34 const GURL& new_url,
35 bool new_method_is_post,
36 const GURL& new_referrer_url,
37 bool new_is_external_protocol) override;
38
39 private:
40 TestNavigationHandle(const GURL& url,
41 const bool is_main_frame,
42 NavigatorDelegate* delegate);
43 };
44
45 } // namespace content
46
47 #endif // CONTENT_TEST_TEST_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698