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

Side by Side Diff: chrome_frame/plugin_url_request.h

Issue 5998006: Clean up Automation and Chrome Frame IPC code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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
« no previous file with comments | « chrome_frame/npapi_url_request.cc ('k') | chrome_frame/test/automation_client_mock.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_FRAME_PLUGIN_URL_REQUEST_H_ 5 #ifndef CHROME_FRAME_PLUGIN_URL_REQUEST_H_
6 #define CHROME_FRAME_PLUGIN_URL_REQUEST_H_ 6 #define CHROME_FRAME_PLUGIN_URL_REQUEST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 READ_REQUEST_THREADSAFE = 0x04, 61 READ_REQUEST_THREADSAFE = 0x04,
62 DOWNLOAD_REQUEST_THREADSAFE = 0x08, 62 DOWNLOAD_REQUEST_THREADSAFE = 0x08,
63 COOKIE_REQUEST_THREADSAFE = 0x10 63 COOKIE_REQUEST_THREADSAFE = 0x10
64 }; 64 };
65 virtual ThreadSafeFlags GetThreadSafeFlags() = 0; 65 virtual ThreadSafeFlags GetThreadSafeFlags() = 0;
66 66
67 // These are called directly from Automation Client when network related 67 // These are called directly from Automation Client when network related
68 // automation messages are received from Chrome. 68 // automation messages are received from Chrome.
69 // Strip 'tab' handle and forward to the virtual methods implemented by 69 // Strip 'tab' handle and forward to the virtual methods implemented by
70 // derived classes. 70 // derived classes.
71 void StartUrlRequest(int tab, int request_id, 71 void StartUrlRequest(int request_id,
72 const IPC::AutomationURLRequest& request_info) { 72 const AutomationURLRequest& request_info) {
73 StartRequest(request_id, request_info); 73 StartRequest(request_id, request_info);
74 } 74 }
75 75
76 void ReadUrlRequest(int tab, int request_id, int bytes_to_read) { 76 void ReadUrlRequest(int request_id, int bytes_to_read) {
77 ReadRequest(request_id, bytes_to_read); 77 ReadRequest(request_id, bytes_to_read);
78 } 78 }
79 79
80 void EndUrlRequest(int tab, int request_id, const URLRequestStatus& s) { 80 void EndUrlRequest(int request_id, const URLRequestStatus& s) {
81 EndRequest(request_id); 81 EndRequest(request_id);
82 } 82 }
83 83
84 void DownloadUrlRequestInHost(int tab, int request_id) { 84 void DownloadUrlRequestInHost(int request_id) {
85 DownloadRequestInHost(request_id); 85 DownloadRequestInHost(request_id);
86 } 86 }
87 87
88 void StopAllRequests() { 88 void StopAllRequests() {
89 StopAll(); 89 StopAll();
90 } 90 }
91 91
92 void GetCookiesFromHost(int tab_handle, const GURL& url, int cookie_id) { 92 void GetCookiesFromHost(const GURL& url, int cookie_id) {
93 GetCookiesForUrl(url, cookie_id); 93 GetCookiesForUrl(url, cookie_id);
94 } 94 }
95 95
96 void SetCookiesInHost(int tab_handle, const GURL& url, 96 void SetCookiesInHost(const GURL& url, const std::string& cookie) {
97 const std::string& cookie) {
98 SetCookiesForUrl(url, cookie); 97 SetCookiesForUrl(url, cookie);
99 } 98 }
100 99
101 protected: 100 protected:
102 PluginUrlRequestDelegate* delegate_; 101 PluginUrlRequestDelegate* delegate_;
103 bool enable_frame_busting_; 102 bool enable_frame_busting_;
104 103
105 private: 104 private:
106 virtual void StartRequest(int request_id, 105 virtual void StartRequest(
107 const IPC::AutomationURLRequest& request_info) = 0; 106 int request_id, const AutomationURLRequest& request_info) = 0;
108 virtual void ReadRequest(int request_id, int bytes_to_read) = 0; 107 virtual void ReadRequest(int request_id, int bytes_to_read) = 0;
109 virtual void EndRequest(int request_id) = 0; 108 virtual void EndRequest(int request_id) = 0;
110 virtual void DownloadRequestInHost(int request_id) = 0; 109 virtual void DownloadRequestInHost(int request_id) = 0;
111 virtual void StopAll() = 0; 110 virtual void StopAll() = 0;
112 virtual void GetCookiesForUrl(const GURL& url, int cookie_id) = 0; 111 virtual void GetCookiesForUrl(const GURL& url, int cookie_id) = 0;
113 virtual void SetCookiesForUrl(const GURL& url, const std::string& cookie) = 0; 112 virtual void SetCookiesForUrl(const GURL& url, const std::string& cookie) = 0;
114 }; 113 };
115 114
116 // Used as base class. Holds Url request properties (url, method, referrer..) 115 // Used as base class. Holds Url request properties (url, method, referrer..)
117 class PluginUrlRequest { 116 class PluginUrlRequest {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 std::string url_; 177 std::string url_;
179 std::string method_; 178 std::string method_;
180 std::string referrer_; 179 std::string referrer_;
181 std::string extra_headers_; 180 std::string extra_headers_;
182 ResourceType::Type resource_type_; 181 ResourceType::Type resource_type_;
183 int load_flags_; 182 int load_flags_;
184 ScopedComPtr<IStream> upload_data_; 183 ScopedComPtr<IStream> upload_data_;
185 }; 184 };
186 185
187 #endif // CHROME_FRAME_PLUGIN_URL_REQUEST_H_ 186 #endif // CHROME_FRAME_PLUGIN_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome_frame/npapi_url_request.cc ('k') | chrome_frame/test/automation_client_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698