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 #include "chrome_frame/chrome_frame_npapi.h" | 5 #include "chrome_frame/chrome_frame_npapi.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 // We can't call SubscribeToFocusEvents here since | 314 // We can't call SubscribeToFocusEvents here since |
315 // when Initialize gets called, Opera is in a state where | 315 // when Initialize gets called, Opera is in a state where |
316 // it can't handle calls back and the thread will hang. | 316 // it can't handle calls back and the thread will hang. |
317 // Instead, we call SubscribeToFocusEvents when we initialize | 317 // Instead, we call SubscribeToFocusEvents when we initialize |
318 // our plugin window. | 318 // our plugin window. |
319 | 319 |
320 // TODO(stoyan): Ask host for specific interface whether to honor | 320 // TODO(stoyan): Ask host for specific interface whether to honor |
321 // host's in-private mode. | 321 // host's in-private mode. |
322 return InitializeAutomation(profile_name, extra_arguments, | 322 return InitializeAutomation(profile_name, extra_arguments, |
323 GetBrowserIncognitoMode(), true); | 323 GetBrowserIncognitoMode()); |
324 } | 324 } |
325 | 325 |
326 void ChromeFrameNPAPI::Uninitialize() { | 326 void ChromeFrameNPAPI::Uninitialize() { |
327 // Don't call SetReadyState as it will end up calling FireEvent. | 327 // Don't call SetReadyState as it will end up calling FireEvent. |
328 // We are in the context of NPP_DESTROY. | 328 // We are in the context of NPP_DESTROY. |
329 ready_state_ = READYSTATE_UNINITIALIZED; | 329 ready_state_ = READYSTATE_UNINITIALIZED; |
330 | 330 |
331 UnsubscribeFromFocusEvents(); | 331 UnsubscribeFromFocusEvents(); |
332 | 332 |
333 if (pref_service_) { | 333 if (pref_service_) { |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 uri.Receive())) { | 1621 uri.Receive())) { |
1622 return false; | 1622 return false; |
1623 } | 1623 } |
1624 | 1624 |
1625 nsCString cookie_value; | 1625 nsCString cookie_value; |
1626 nsresult ret = cookie_service->SetCookieString(uri, NULL, | 1626 nsresult ret = cookie_service->SetCookieString(uri, NULL, |
1627 cookie_string.c_str(), NULL); | 1627 cookie_string.c_str(), NULL); |
1628 return NS_SUCCEEDED(ret); | 1628 return NS_SUCCEEDED(ret); |
1629 } | 1629 } |
1630 | 1630 |
OLD | NEW |