OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PLUGIN_H_ | 5 #ifndef CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ |
6 #define CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ | 6 #define CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 if (bounds) { | 97 if (bounds) { |
98 if (::IsWindow(GetWindow())) { | 98 if (::IsWindow(GetWindow())) { |
99 (static_cast<T*>(this))->GetClientRect(bounds); | 99 (static_cast<T*>(this))->GetClientRect(bounds); |
100 } | 100 } |
101 } | 101 } |
102 } | 102 } |
103 virtual std::string GetDocumentUrl() { | 103 virtual std::string GetDocumentUrl() { |
104 return document_url_; | 104 return document_url_; |
105 } | 105 } |
106 virtual void OnAutomationServerReady() { | 106 virtual void OnAutomationServerReady() { |
107 // Issue the extension automation request if we're privileged to | |
108 // allow this control to handle extension requests from Chrome. | |
109 if (is_privileged() && IsValid()) | |
110 automation_client_->SetEnableExtensionAutomation(functions_enabled_); | |
111 } | 107 } |
112 | 108 |
113 virtual bool IsValid() const { | 109 virtual bool IsValid() const { |
114 return automation_client_.get() != NULL; | 110 return automation_client_.get() != NULL; |
115 } | 111 } |
116 | 112 |
117 virtual void OnHostMoved() { | 113 virtual void OnHostMoved() { |
118 if (IsValid()) | 114 if (IsValid()) |
119 automation_client_->OnChromeFrameHostMoved(); | 115 automation_client_->OnChromeFrameHostMoved(); |
120 } | 116 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // How we launched Chrome. | 256 // How we launched Chrome. |
261 scoped_refptr<ChromeFrameLaunchParams> launch_params_; | 257 scoped_refptr<ChromeFrameLaunchParams> launch_params_; |
262 | 258 |
263 // Url of the containing document. | 259 // Url of the containing document. |
264 std::string document_url_; | 260 std::string document_url_; |
265 | 261 |
266 // We set this flag when we're taking the focus ourselves | 262 // We set this flag when we're taking the focus ourselves |
267 // and notifying the host browser that we're doing so. | 263 // and notifying the host browser that we're doing so. |
268 // When the flag is not set, we transfer the focus to chrome. | 264 // When the flag is not set, we transfer the focus to chrome. |
269 bool ignore_setfocus_; | 265 bool ignore_setfocus_; |
270 | |
271 // List of functions to enable for automation, or a single entry "*" to | |
272 // enable all functions for automation. Ignored unless is_privileged_ is | |
273 // true. Defaults to the empty list, meaning automation will not be | |
274 // turned on. | |
275 std::vector<std::string> functions_enabled_; | |
276 }; | 266 }; |
277 | 267 |
278 #endif // CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ | 268 #endif // CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ |
OLD | NEW |