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

Side by Side Diff: content/public/test/navigation_handle_tester.cc

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Rebase 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 #include "content/public/test/navigation_handle_tester.h"
6
7 #include "content/browser/frame_host/navigator.h"
8 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/public/browser/navigation_handle.h"
10 #include "content/public/browser/web_contents.h"
11 #include "content/test/test_navigation_handle.h"
12
13 namespace content {
14
15 // static
16 NavigationHandleTester* NavigationHandleTester::For(
17 NavigationHandle* navigation_handle) {
18 return static_cast<TestNavigationHandle*>(navigation_handle);
19 }
20
21 // static
22 NavigationHandle* NavigationHandleTester::CreateTestNavigationHandle(
23 const GURL& url,
24 const GURL& validated_url,
25 bool is_main_frame,
26 WebContents* web_contents) {
27 return TestNavigationHandle::Create(
28 url, validated_url, is_main_frame,
29 static_cast<WebContentsImpl*>(web_contents)
30 ->GetMainFrame()
31 ->frame_tree_node()
32 ->navigator()
33 ->GetDelegate());
34 }
35
36 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698