OLD | NEW |
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> |
(...skipping 14 matching lines...) Expand all Loading... |
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 |
31 // AutomationProxy ctor for details. | 31 // AutomationProxy ctor for details. |
32 const unsigned long kCommandExecutionTimeout = 60000; // NOLINT, 60 seconds | 32 const unsigned long kCommandExecutionTimeout = 60000; // NOLINT, 60 seconds |
33 | 33 |
34 class ProxyFactory; | 34 class ProxyFactory; |
| 35 class NavigationConstraints; |
35 enum AutomationPageFontSize; | 36 enum AutomationPageFontSize; |
36 | 37 |
37 struct DECLSPEC_NOVTABLE ChromeFrameAutomationProxy { // NOLINT | 38 struct DECLSPEC_NOVTABLE ChromeFrameAutomationProxy { // NOLINT |
38 virtual bool Send(IPC::Message* msg) = 0; | 39 virtual bool Send(IPC::Message* msg) = 0; |
39 | 40 |
40 virtual void SendAsAsync( | 41 virtual void SendAsAsync( |
41 IPC::SyncMessage* msg, | 42 IPC::SyncMessage* msg, |
42 SyncMessageReplyDispatcher::SyncMessageCallContext* context, | 43 SyncMessageReplyDispatcher::SyncMessageCallContext* context, |
43 void* key) = 0; | 44 void* key) = 0; |
44 virtual void CancelAsync(void* key) = 0; | 45 virtual void CancelAsync(void* key) = 0; |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 public: | 325 public: |
325 ChromeFrameAutomationClient(); | 326 ChromeFrameAutomationClient(); |
326 ~ChromeFrameAutomationClient(); | 327 ~ChromeFrameAutomationClient(); |
327 | 328 |
328 // Called from UI thread. | 329 // Called from UI thread. |
329 virtual bool Initialize(ChromeFrameDelegate* chrome_frame_delegate, | 330 virtual bool Initialize(ChromeFrameDelegate* chrome_frame_delegate, |
330 ChromeFrameLaunchParams* chrome_launch_params); | 331 ChromeFrameLaunchParams* chrome_launch_params); |
331 void Uninitialize(); | 332 void Uninitialize(); |
332 void NotifyAndUninitialize(); | 333 void NotifyAndUninitialize(); |
333 | 334 |
334 virtual bool InitiateNavigation(const std::string& url, | 335 virtual bool InitiateNavigation( |
335 const std::string& referrer, | 336 const std::string& url, |
336 bool is_privileged); | 337 const std::string& referrer, |
| 338 NavigationConstraints* navigation_constraints); |
| 339 |
337 virtual bool NavigateToIndex(int index); | 340 virtual bool NavigateToIndex(int index); |
338 bool ForwardMessageFromExternalHost(const std::string& message, | 341 bool ForwardMessageFromExternalHost(const std::string& message, |
339 const std::string& origin, | 342 const std::string& origin, |
340 const std::string& target); | 343 const std::string& target); |
341 bool SetProxySettings(const std::string& json_encoded_proxy_settings); | 344 bool SetProxySettings(const std::string& json_encoded_proxy_settings); |
342 | 345 |
343 virtual void SetEnableExtensionAutomation( | 346 virtual void SetEnableExtensionAutomation( |
344 const std::vector<std::string>& functions_enabled); | 347 const std::vector<std::string>& functions_enabled); |
345 | 348 |
346 void FindInPage(const std::wstring& search_string, | 349 void FindInPage(const std::wstring& search_string, |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 // 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 |
557 // 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 |
558 // page without chrome frame. Defaults to false. | 561 // page without chrome frame. Defaults to false. |
559 bool route_all_top_level_navigations_; | 562 bool route_all_top_level_navigations_; |
560 | 563 |
561 friend class BeginNavigateContext; | 564 friend class BeginNavigateContext; |
562 friend class CreateExternalTabContext; | 565 friend class CreateExternalTabContext; |
563 }; | 566 }; |
564 | 567 |
565 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ | 568 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ |
OLD | NEW |