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

Side by Side Diff: chrome_frame/chrome_frame_automation.h

Issue 386014: The ChromeFrameAutomationClient class needs to be refcounted as it implements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/chrome_frame_activex_base.h ('k') | chrome_frame/chrome_frame_automation.cc » ('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_CHROME_FRAME_AUTOMATION_H_ 5 #ifndef CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_
6 #define CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ 6 #define CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlwin.h> 9 #include <atlwin.h>
10 #include <string> 10 #include <string>
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 bool AddRequest(PluginUrlRequest* request); 226 bool AddRequest(PluginUrlRequest* request);
227 void RemoveRequest(PluginUrlRequest* request); 227 void RemoveRequest(PluginUrlRequest* request);
228 virtual bool Send(IPC::Message* msg); 228 virtual bool Send(IPC::Message* msg);
229 229
230 // URL request related 230 // URL request related
231 bool ReadRequest(int request_id, int bytes_to_read); 231 bool ReadRequest(int request_id, int bytes_to_read);
232 void RemoveRequest(int request_id, bool abort); 232 void RemoveRequest(int request_id, bool abort);
233 PluginUrlRequest* LookupRequest(int request_id) const; 233 PluginUrlRequest* LookupRequest(int request_id) const;
234 bool IsValidRequest(PluginUrlRequest* request) const; 234 bool IsValidRequest(PluginUrlRequest* request) const;
235 void CleanupRequests(); 235 void CleanupRequests();
236 // For IE the host network stack requests are issued on a separate thread,
237 // which requires the requests to be cleaned up asynchronously.
238 void CleanupAsyncRequests();
239 236
240 void set_use_chrome_network(bool use_chrome_network) { 237 void set_use_chrome_network(bool use_chrome_network) {
241 use_chrome_network_ = use_chrome_network; 238 use_chrome_network_ = use_chrome_network;
242 } 239 }
243 bool use_chrome_network() const { 240 bool use_chrome_network() const {
244 return use_chrome_network_; 241 return use_chrome_network_;
245 } 242 }
246 243
247 #ifdef UNIT_TEST 244 #ifdef UNIT_TEST
248 void set_proxy_factory(ProxyFactory* factory) { 245 void set_proxy_factory(ProxyFactory* factory) {
249 proxy_factory_ = factory; 246 proxy_factory_ = factory;
250 } 247 }
251 #endif 248 #endif
252 249
253 void set_handle_top_level_requests(bool handle_top_level_requests) { 250 void set_handle_top_level_requests(bool handle_top_level_requests) {
254 handle_top_level_requests_ = handle_top_level_requests; 251 handle_top_level_requests_ = handle_top_level_requests;
255 } 252 }
256 253
257 // Called if the same instance of the ChromeFrameAutomationClient object 254 // Called if the same instance of the ChromeFrameAutomationClient object
258 // is reused. 255 // is reused.
259 bool Reinitialize(ChromeFrameDelegate* chrome_frame_delegate); 256 bool Reinitialize(ChromeFrameDelegate* chrome_frame_delegate);
260 257
261 // Attaches an existing external tab to this automation client instance. 258 // Attaches an existing external tab to this automation client instance.
262 void AttachExternalTab(intptr_t external_tab_cookie); 259 void AttachExternalTab(intptr_t external_tab_cookie);
263 260
264 void SetPageFontSize(enum AutomationPageFontSize); 261 void SetPageFontSize(enum AutomationPageFontSize);
265 262
266 // Dummy reference counting functions to enable us to use the
267 // TaskMarshallerThroughWindowsMessages functionality. At this point we don't
268 // need to ensure that any tasks executed on us grab a reference to ensure
269 // that the instance remains valid.
270 void AddRef() {}
271 void Release() {}
272
273 protected: 263 protected:
274 // ChromeFrameAutomationProxy::LaunchDelegate implementation. 264 // ChromeFrameAutomationProxy::LaunchDelegate implementation.
275 virtual void LaunchComplete(ChromeFrameAutomationProxy* proxy, 265 virtual void LaunchComplete(ChromeFrameAutomationProxy* proxy,
276 AutomationLaunchResult result); 266 AutomationLaunchResult result);
277 // TabProxyDelegate implementation 267 // TabProxyDelegate implementation
278 virtual void OnMessageReceived(TabProxy* tab, const IPC::Message& msg); 268 virtual void OnMessageReceived(TabProxy* tab, const IPC::Message& msg);
279 269
280 void CreateExternalTab(); 270 void CreateExternalTab();
281 void CreateExternalTabComplete(HWND chrome_window, HWND tab_window, 271 void CreateExternalTabComplete(HWND chrome_window, HWND tab_window,
282 int tab_handle); 272 int tab_handle);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 InitializationState init_state_; 331 InitializationState init_state_;
342 bool use_chrome_network_; 332 bool use_chrome_network_;
343 bool handle_top_level_requests_; 333 bool handle_top_level_requests_;
344 ProxyFactory* proxy_factory_; 334 ProxyFactory* proxy_factory_;
345 int tab_handle_; 335 int tab_handle_;
346 // Only used if we attach to an existing tab. 336 // Only used if we attach to an existing tab.
347 intptr_t external_tab_cookie_; 337 intptr_t external_tab_cookie_;
348 }; 338 };
349 339
350 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ 340 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame_activex_base.h ('k') | chrome_frame/chrome_frame_automation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698