| OLD | NEW |
| 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_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 "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "base/win_util.h" | 9 #include "base/win_util.h" |
| 10 #include "chrome_frame/chrome_frame_automation.h" | 10 #include "chrome_frame/chrome_frame_automation.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 void Uninitialize() { | 45 void Uninitialize() { |
| 46 if (IsValid()) { | 46 if (IsValid()) { |
| 47 automation_client_->Uninitialize(); | 47 automation_client_->Uninitialize(); |
| 48 automation_client_ = NULL; | 48 automation_client_ = NULL; |
| 49 } | 49 } |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool InitializeAutomation(const std::wstring& profile_name, | 52 bool InitializeAutomation(const std::wstring& profile_name, |
| 53 const std::wstring& extra_chrome_arguments, | 53 const std::wstring& extra_chrome_arguments, |
| 54 bool incognito, bool is_widget_mode) { | 54 bool incognito) { |
| 55 DCHECK(IsValid()); | 55 DCHECK(IsValid()); |
| 56 // We don't want to do incognito when privileged, since we're | 56 // We don't want to do incognito when privileged, since we're |
| 57 // running in browser chrome or some other privileged context. | 57 // running in browser chrome or some other privileged context. |
| 58 bool incognito_mode = !is_privileged_ && incognito; | 58 bool incognito_mode = !is_privileged_ && incognito; |
| 59 ChromeFrameLaunchParams chrome_launch_params = { | 59 return automation_client_->Initialize(this, kCommandExecutionTimeout, true, |
| 60 kCommandExecutionTimeout, | 60 profile_name, extra_chrome_arguments, |
| 61 GURL(), | 61 incognito_mode); |
| 62 GURL(), | |
| 63 profile_name, | |
| 64 extra_chrome_arguments, | |
| 65 true, | |
| 66 incognito_mode, | |
| 67 is_widget_mode | |
| 68 }; | |
| 69 return automation_client_->Initialize(this, chrome_launch_params); | |
| 70 } | 62 } |
| 71 | 63 |
| 72 // ChromeFrameDelegate implementation | 64 // ChromeFrameDelegate implementation |
| 73 virtual WindowType GetWindow() const { | 65 virtual WindowType GetWindow() const { |
| 74 return (static_cast<const T*>(this))->m_hWnd; | 66 return (static_cast<const T*>(this))->m_hWnd; |
| 75 } | 67 } |
| 76 | 68 |
| 77 virtual void GetBounds(RECT* bounds) { | 69 virtual void GetBounds(RECT* bounds) { |
| 78 if (bounds) { | 70 if (bounds) { |
| 79 if (::IsWindow(GetWindow())) { | 71 if (::IsWindow(GetWindow())) { |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 232 |
| 241 // List of functions to enable for automation, or a single entry "*" to | 233 // List of functions to enable for automation, or a single entry "*" to |
| 242 // enable all functions for automation. Ignored unless is_privileged_ is | 234 // enable all functions for automation. Ignored unless is_privileged_ is |
| 243 // true. Defaults to the empty list, meaning automation will not be | 235 // true. Defaults to the empty list, meaning automation will not be |
| 244 // turned on. | 236 // turned on. |
| 245 std::vector<std::string> functions_enabled_; | 237 std::vector<std::string> functions_enabled_; |
| 246 }; | 238 }; |
| 247 | 239 |
| 248 #endif // CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ | 240 #endif // CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ |
| 249 | 241 |
| OLD | NEW |