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

Side by Side Diff: content/test/test_navigation_handle_factory.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_FACTORY_H_
6 #define CONTENT_TEST_TEST_NAVIGATION_HANDLE_FACTORY_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/frame_host/navigation_handle_factory.h"
10
11 namespace content {
12
13 // Manages creation of the NavigationHandles; when registered, all created
14 // NavigationHandles will be TestNavigationHandles. This automatically
15 // registers itself when it goes in scope, and unregisters itself when it goes
16 // out of scope. Since you can't have more than one factory registered at a
17 // time, you can only have one of these objects at a time.
18 class TestNavigationHandleFactory : public NavigationHandleFactory {
19 public:
20 TestNavigationHandleFactory();
21 ~TestNavigationHandleFactory() override;
22
23 // NavigationHandleFactory implementation.
24 scoped_ptr<NavigationHandleImpl> CreateHandle(
25 const GURL& url,
26 const GURL& validated_url,
27 bool is_main_frame,
28 NavigatorDelegate* delegate) override;
29
30 private:
31 DISALLOW_COPY_AND_ASSIGN(TestNavigationHandleFactory);
32 };
33
34 } // namespace content
35
36 #endif // CONTENT_TEST_TEST_NAVIGATION_HANDLE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698