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

Side by Side Diff: chrome_frame/chrome_frame_automation.h

Issue 6001010: Move platform_thread to base/threading and put in the base namespace. I left ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « chrome_frame/cfproxy_private.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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>
11 #include <map> 11 #include <map>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/lock.h" 14 #include "base/lock.h"
15 #include "base/ref_counted.h" 15 #include "base/ref_counted.h"
16 #include "base/scoped_handle.h" 16 #include "base/scoped_handle.h"
17 #include "base/stack_container.h" 17 #include "base/stack_container.h"
18 #include "base/task.h" 18 #include "base/task.h"
19 #include "base/thread.h"
19 #include "base/timer.h" 20 #include "base/timer.h"
20 #include "base/thread.h"
21 #include "chrome/common/page_zoom.h" 21 #include "chrome/common/page_zoom.h"
22 #include "chrome/test/automation/automation_proxy.h" 22 #include "chrome/test/automation/automation_proxy.h"
23 #include "chrome/test/automation/tab_proxy.h" 23 #include "chrome/test/automation/tab_proxy.h"
24 #include "chrome_frame/chrome_frame_delegate.h" 24 #include "chrome_frame/chrome_frame_delegate.h"
25 #include "chrome_frame/chrome_frame_histograms.h" 25 #include "chrome_frame/chrome_frame_histograms.h"
26 #include "chrome_frame/plugin_url_request.h" 26 #include "chrome_frame/plugin_url_request.h"
27 #include "chrome_frame/sync_msg_reply_dispatcher.h" 27 #include "chrome_frame/sync_msg_reply_dispatcher.h"
28 28
29 // By a convoluated route, this timeout also winds up being the sync automation 29 // By a convoluated route, this timeout also winds up being the sync automation
30 // message timeout. See the ChromeFrameAutomationProxyImpl ctor and the 30 // message timeout. See the ChromeFrameAutomationProxyImpl ctor and the
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 244 }
245 245
246 base::Thread* thread() const { 246 base::Thread* thread() const {
247 return thread_.get(); 247 return thread_.get();
248 } 248 }
249 249
250 MessageLoop* message_loop() const { 250 MessageLoop* message_loop() const {
251 return thread_->message_loop(); 251 return thread_->message_loop();
252 } 252 }
253 253
254 bool IsSameThread(PlatformThreadId id) const { 254 bool IsSameThread(base::PlatformThreadId id) const {
255 return thread_->thread_id() == id; 255 return thread_->thread_id() == id;
256 } 256 }
257 257
258 ChromeFrameAutomationProxyImpl* proxy() const { 258 ChromeFrameAutomationProxyImpl* proxy() const {
259 DCHECK(IsSameThread(PlatformThread::CurrentId())); 259 DCHECK(IsSameThread(base::PlatformThread::CurrentId()));
260 return proxy_.get(); 260 return proxy_.get();
261 } 261 }
262 262
263 // Called by the proxy when the automation server has unexpectedly gone away. 263 // Called by the proxy when the automation server has unexpectedly gone away.
264 void OnChannelError(); 264 void OnChannelError();
265 265
266 protected: 266 protected:
267 void CreateProxy(ChromeFrameLaunchParams* params, 267 void CreateProxy(ChromeFrameLaunchParams* params,
268 LaunchDelegate* delegate); 268 LaunchDelegate* delegate);
269 void SendUMAData(); 269 void SendUMAData();
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 virtual void OnReadComplete(int request_id, const std::string& data); 502 virtual void OnReadComplete(int request_id, const std::string& data);
503 virtual void OnResponseEnd(int request_id, const URLRequestStatus& status); 503 virtual void OnResponseEnd(int request_id, const URLRequestStatus& status);
504 virtual void OnCookiesRetrieved(bool success, const GURL& url, 504 virtual void OnCookiesRetrieved(bool success, const GURL& url,
505 const std::string& cookie_string, int cookie_id); 505 const std::string& cookie_string, int cookie_id);
506 506
507 bool is_initialized() const { 507 bool is_initialized() const {
508 return init_state_ == INITIALIZED; 508 return init_state_ == INITIALIZED;
509 } 509 }
510 510
511 HWND parent_window_; 511 HWND parent_window_;
512 PlatformThreadId ui_thread_id_; 512 base::PlatformThreadId ui_thread_id_;
513 513
514 void* automation_server_id_; 514 void* automation_server_id_;
515 ChromeFrameAutomationProxy* automation_server_; 515 ChromeFrameAutomationProxy* automation_server_;
516 516
517 HWND chrome_window_; 517 HWND chrome_window_;
518 scoped_refptr<TabProxy> tab_; 518 scoped_refptr<TabProxy> tab_;
519 ChromeFrameDelegate* chrome_frame_delegate_; 519 ChromeFrameDelegate* chrome_frame_delegate_;
520 520
521 // Handle to the underlying chrome window. This is a child of the external 521 // Handle to the underlying chrome window. This is a child of the external
522 // tab window. 522 // tab window.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // set to true if the host needs to get notified of all top level navigations 559 // set to true if the host needs to get notified of all top level navigations
560 // in this page. This typically applies to hosts which would render the new 560 // in this page. This typically applies to hosts which would render the new
561 // page without chrome frame. Defaults to false. 561 // page without chrome frame. Defaults to false.
562 bool route_all_top_level_navigations_; 562 bool route_all_top_level_navigations_;
563 563
564 friend class BeginNavigateContext; 564 friend class BeginNavigateContext;
565 friend class CreateExternalTabContext; 565 friend class CreateExternalTabContext;
566 }; 566 };
567 567
568 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ 568 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_
OLDNEW
« no previous file with comments | « chrome_frame/cfproxy_private.h ('k') | chrome_frame/chrome_frame_automation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698