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

Side by Side Diff: chrome_frame/test/net/test_automation_provider.h

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 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 #ifndef CHROME_FRAME_TEST_NET_TEST_AUTOMATION_PROVIDER_H_
5 #define CHROME_FRAME_TEST_NET_TEST_AUTOMATION_PROVIDER_H_
6
7 #include "chrome/browser/automation/automation_provider.h"
8
9 class TestAutomationResourceMessageFilter;
10
11 // Callback interface for TestAutomationProvider.
12 class TestAutomationProviderDelegate {
13 public:
14 virtual void OnInitialTabLoaded() = 0;
15 };
16
17 // A slightly customized version of AutomationProvider.
18 // We override AutomationProvider to be able to filter received messages
19 // (see TestAutomationResourceMessageFilter) and know when the initial
20 // ExternalTab has been loaded.
21 // In order to intercept UrlRequests and make the URLRequestAutomationJob class
22 // handle requests from unit tests, we also implement URLRequest::Interceptor.
23 class TestAutomationProvider
24 : public AutomationProvider,
25 public URLRequest::Interceptor {
26 public:
27 explicit TestAutomationProvider(Profile* profile,
28 TestAutomationProviderDelegate* delegate);
29
30 virtual ~TestAutomationProvider();
31
32 // AutomationProvider overrides.
33 virtual void OnMessageReceived(const IPC::Message& msg);
34 virtual bool Send(IPC::Message* msg);
35
36 // URLRequest::Interceptor.
37 virtual URLRequestJob* MaybeIntercept(URLRequest* request);
38
39 // Call to instantiate and initialize a new instance of
40 // TestAutomationProvider.
41 static TestAutomationProvider* NewAutomationProvider(
42 Profile* p,
43 const std::string& channel,
44 TestAutomationProviderDelegate* delegate);
45
46 protected:
47 scoped_refptr<TestAutomationResourceMessageFilter> filter_;
48 int tab_handle_;
49 TestAutomationProviderDelegate* delegate_;
50 };
51
52 #endif CHROME_FRAME_TEST_NET_TEST_AUTOMATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome_frame/test/net/process_singleton_subclass.cc ('k') | chrome_frame/test/net/test_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698