| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 DLOG(INFO) << __FUNCTION__; | 54 DLOG(INFO) << __FUNCTION__; |
| 55 if (IsValid()) { | 55 if (IsValid()) { |
| 56 automation_client_->Uninitialize(); | 56 automation_client_->Uninitialize(); |
| 57 automation_client_ = NULL; | 57 automation_client_ = NULL; |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool InitializeAutomation(const std::wstring& profile_name, | 61 bool InitializeAutomation(const std::wstring& profile_name, |
| 62 const std::wstring& extra_chrome_arguments, | 62 const std::wstring& extra_chrome_arguments, |
| 63 bool incognito, bool is_widget_mode, | 63 bool incognito, bool is_widget_mode, |
| 64 const GURL& url, const GURL& referrer) { | 64 const GURL& url, const GURL& referrer, |
| 65 bool route_all_top_level_navigations) { |
| 65 DCHECK(IsValid()); | 66 DCHECK(IsValid()); |
| 66 DCHECK(launch_params_ == NULL); | 67 DCHECK(launch_params_ == NULL); |
| 67 // We don't want to do incognito when privileged, since we're | 68 // We don't want to do incognito when privileged, since we're |
| 68 // running in browser chrome or some other privileged context. | 69 // running in browser chrome or some other privileged context. |
| 69 bool incognito_mode = !is_privileged_ && incognito; | 70 bool incognito_mode = !is_privileged_ && incognito; |
| 70 FilePath profile_path; | 71 FilePath profile_path; |
| 71 GetProfilePath(profile_name, &profile_path); | 72 GetProfilePath(profile_name, &profile_path); |
| 72 // The profile name could change based on the browser version. For e.g. for | 73 // The profile name could change based on the browser version. For e.g. for |
| 73 // IE6/7 the profile is created in a different folder whose last component | 74 // IE6/7 the profile is created in a different folder whose last component |
| 74 // is Google Chrome Frame. | 75 // is Google Chrome Frame. |
| 75 FilePath actual_profile_name = profile_path.BaseName(); | 76 FilePath actual_profile_name = profile_path.BaseName(); |
| 76 launch_params_ = new ChromeFrameLaunchParams(url, referrer, profile_path, | 77 launch_params_ = new ChromeFrameLaunchParams(url, referrer, profile_path, |
| 77 actual_profile_name.value(), extra_chrome_arguments, incognito_mode, | 78 actual_profile_name.value(), extra_chrome_arguments, incognito_mode, |
| 78 is_widget_mode); | 79 is_widget_mode, route_all_top_level_navigations); |
| 79 return automation_client_->Initialize(this, launch_params_); | 80 return automation_client_->Initialize(this, launch_params_); |
| 80 } | 81 } |
| 81 | 82 |
| 82 // ChromeFrameDelegate implementation | 83 // ChromeFrameDelegate implementation |
| 83 virtual WindowType GetWindow() const { | 84 virtual WindowType GetWindow() const { |
| 84 return (static_cast<const T*>(this))->m_hWnd; | 85 return (static_cast<const T*>(this))->m_hWnd; |
| 85 } | 86 } |
| 86 | 87 |
| 87 virtual void GetBounds(RECT* bounds) { | 88 virtual void GetBounds(RECT* bounds) { |
| 88 if (bounds) { | 89 if (bounds) { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 268 |
| 268 // List of functions to enable for automation, or a single entry "*" to | 269 // List of functions to enable for automation, or a single entry "*" to |
| 269 // enable all functions for automation. Ignored unless is_privileged_ is | 270 // enable all functions for automation. Ignored unless is_privileged_ is |
| 270 // true. Defaults to the empty list, meaning automation will not be | 271 // true. Defaults to the empty list, meaning automation will not be |
| 271 // turned on. | 272 // turned on. |
| 272 std::vector<std::string> functions_enabled_; | 273 std::vector<std::string> functions_enabled_; |
| 273 }; | 274 }; |
| 274 | 275 |
| 275 #endif // CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ | 276 #endif // CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ |
| 276 | 277 |
| OLD | NEW |