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_CFPROXY_H_ | 5 #ifndef CHROME_FRAME_CFPROXY_H_ |
6 #define CHROME_FRAME_CFPROXY_H_ | 6 #define CHROME_FRAME_CFPROXY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <map> // for proxy factory | 10 #include <map> // for proxy factory |
11 #include <vector> | 11 #include <vector> |
12 #include <string> | 12 #include <string> |
13 #include "base/lock.h" | 13 #include "base/lock.h" |
14 #include "base/time.h" // for base::TimeDelta | 14 #include "base/time.h" // for base::TimeDelta |
15 #include "base/file_path.h" | 15 #include "base/file_path.h" |
16 #include "chrome/common/automation_constants.h" | |
17 #include "chrome/common/page_zoom.h" | 16 #include "chrome/common/page_zoom.h" |
| 17 #include "chrome/test/automation/automation_constants.h" |
18 | 18 |
19 enum FindInPageDirection { BACK = 0, FWD = 1 }; | 19 enum FindInPageDirection { BACK = 0, FWD = 1 }; |
20 enum FindInPageCase { IGNORE_CASE = 0, CASE_SENSITIVE = 1 }; | 20 enum FindInPageCase { IGNORE_CASE = 0, CASE_SENSITIVE = 1 }; |
21 // Specifies the font size on a page which is requested by an automation | 21 // Specifies the font size on a page which is requested by an automation |
22 // client. | 22 // client. |
23 enum AutomationPageFontSize { | 23 enum AutomationPageFontSize { |
24 SMALLEST_FONT = 8, | 24 SMALLEST_FONT = 8, |
25 SMALL_FONT = 12, | 25 SMALL_FONT = 12, |
26 MEDIUM_FONT = 16, | 26 MEDIUM_FONT = 16, |
27 LARGE_FONT = 24, | 27 LARGE_FONT = 24, |
28 LARGEST_FONT = 36 | 28 LARGEST_FONT = 36 |
29 }; | 29 }; |
30 | 30 |
31 class URLRequestStatus; | 31 class URLRequestStatus; |
32 namespace IPC { | 32 namespace IPC { |
33 struct ExternalTabSettings; | 33 struct ExternalTabSettings; |
34 struct NavigationInfo; | 34 struct NavigationInfo; |
35 struct AutomationURLRequest; | 35 struct AutomationURLRequest; |
36 struct AttachExternalTabParams; | 36 struct AttachExternalTabParams; |
37 struct MiniContextMenuParams; | 37 struct ContextMenuParams; |
38 }; | 38 }; |
39 | 39 |
40 class GURL; | 40 class GURL; |
41 class ChromeProxyFactory; | 41 class ChromeProxyFactory; |
42 class ChromeProxyDelegate; | 42 class ChromeProxyDelegate; |
43 struct ProxyParams; | 43 struct ProxyParams; |
44 | 44 |
45 // Some callers of synchronous messages wants a context to be passed back | 45 // Some callers of synchronous messages wants a context to be passed back |
46 // in order to identify the call they made. Presumably one can make | 46 // in order to identify the call they made. Presumably one can make |
47 // multiple sync calls of same type (as async) and want to identify what | 47 // multiple sync calls of same type (as async) and want to identify what |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 // Navigation and messaging. | 189 // Navigation and messaging. |
190 virtual void OpenURL(const GURL& url_to_open, const GURL& referrer, | 190 virtual void OpenURL(const GURL& url_to_open, const GURL& referrer, |
191 int open_disposition) = 0; | 191 int open_disposition) = 0; |
192 virtual void GoToHistoryOffset(int offset) = 0; | 192 virtual void GoToHistoryOffset(int offset) = 0; |
193 virtual void MessageToHost(const std::string& message, | 193 virtual void MessageToHost(const std::string& message, |
194 const std::string& origin, | 194 const std::string& origin, |
195 const std::string& target) = 0; | 195 const std::string& target) = 0; |
196 // Misc. UI. | 196 // Misc. UI. |
197 virtual void HandleAccelerator(const MSG& accel_message) = 0; | 197 virtual void HandleAccelerator(const MSG& accel_message) = 0; |
198 virtual void HandleContextMenu(HANDLE menu_handle, int align_flags, | 198 virtual void HandleContextMenu(HANDLE menu_handle, int align_flags, |
199 const IPC::MiniContextMenuParams& params) = 0; | 199 const IPC::ContextMenuParams& params) = 0; |
200 virtual void TabbedOut(bool reverse) = 0; | 200 virtual void TabbedOut(bool reverse) = 0; |
201 | 201 |
202 // Tab related. | 202 // Tab related. |
203 virtual void TabClosed() = 0; | 203 virtual void TabClosed() = 0; |
204 virtual void AttachTab(const IPC::AttachExternalTabParams& attach_params) = 0; | 204 virtual void AttachTab(const IPC::AttachExternalTabParams& attach_params) = 0; |
205 protected: | 205 protected: |
206 ~ChromeProxyDelegate() {} | 206 ~ChromeProxyDelegate() {} |
207 }; | 207 }; |
208 | 208 |
209 // a way to obtain a ChromeProxy implementation | 209 // a way to obtain a ChromeProxy implementation |
(...skipping 11 matching lines...) Expand all Loading... |
221 void GetProxy(ChromeProxyDelegate* delegate, const ProxyParams& params); | 221 void GetProxy(ChromeProxyDelegate* delegate, const ProxyParams& params); |
222 bool ReleaseProxy(ChromeProxyDelegate* delegate, const std::string& profile); | 222 bool ReleaseProxy(ChromeProxyDelegate* delegate, const std::string& profile); |
223 protected: | 223 protected: |
224 virtual ChromeProxy* CreateProxy(); | 224 virtual ChromeProxy* CreateProxy(); |
225 typedef std::map<std::string, ChromeProxy*> ProxyMap; | 225 typedef std::map<std::string, ChromeProxy*> ProxyMap; |
226 ProxyMap proxies_; | 226 ProxyMap proxies_; |
227 Lock lock_; | 227 Lock lock_; |
228 }; | 228 }; |
229 | 229 |
230 #endif // CHROME_FRAME_CFPROXY_H_ | 230 #endif // CHROME_FRAME_CFPROXY_H_ |
OLD | NEW |