OLD | NEW |
(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_ |
OLD | NEW |