Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: chrome_frame/chrome_frame_npapi.cc

Issue 4563001: Adding a privileged callback used in IE CF to check whether to show... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/chrome_frame_activex.cc ('k') | chrome_frame/chrome_tab.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #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_split.h" 10 #include "base/string_split.h"
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 } 875 }
876 } 876 }
877 877
878 SetReadyState(READYSTATE_COMPLETE); 878 SetReadyState(READYSTATE_COMPLETE);
879 } 879 }
880 880
881 void ChromeFrameNPAPI::OnAutomationServerLaunchFailed( 881 void ChromeFrameNPAPI::OnAutomationServerLaunchFailed(
882 AutomationLaunchResult reason, const std::string& server_version) { 882 AutomationLaunchResult reason, const std::string& server_version) {
883 SetReadyState(READYSTATE_UNINITIALIZED); 883 SetReadyState(READYSTATE_UNINITIALIZED);
884 884
885 // Do not display warnings for privileged instances of Chrome Frame. 885 // In IE, we don't display warnings for privileged CF instances because
886 if (reason == AUTOMATION_VERSION_MISMATCH && !is_privileged_) { 886 // there are 2 CFs created for each tab (so we decide on the CEEE side
887 // whether to show a warning). In FF however, there is only one privileged
888 // CF instance per Firefox window, so OK to show the warning there without
889 // any further logic.
890 if (reason == AUTOMATION_VERSION_MISMATCH) {
887 THREAD_SAFE_UMA_HISTOGRAM_COUNTS("ChromeFrame.VersionMismatchDisplayed", 1); 891 THREAD_SAFE_UMA_HISTOGRAM_COUNTS("ChromeFrame.VersionMismatchDisplayed", 1);
888 DisplayVersionMismatchWarning(m_hWnd, server_version); 892 DisplayVersionMismatchWarning(m_hWnd, server_version);
889 } 893 }
890 } 894 }
891 895
892 void ChromeFrameNPAPI::OnCloseTab(int tab_handle) { 896 void ChromeFrameNPAPI::OnCloseTab(int tab_handle) {
893 std::string arg; 897 std::string arg;
894 FireEvent("close", arg); 898 FireEvent("close", arg);
895 ScopedNpVariant result; 899 ScopedNpVariant result;
896 InvokeDefault(onclose_handler_, arg, &result); 900 InvokeDefault(onclose_handler_, arg, &result);
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 } 1497 }
1494 1498
1495 int32 ChromeFrameNPAPI::Write(NPStream* stream, int32 offset, int32 len, 1499 int32 ChromeFrameNPAPI::Write(NPStream* stream, int32 offset, int32 len,
1496 void* buffer) { 1500 void* buffer) {
1497 return url_fetcher_.Write(stream, offset, len, buffer); 1501 return url_fetcher_.Write(stream, offset, len, buffer);
1498 } 1502 }
1499 1503
1500 NPError ChromeFrameNPAPI::DestroyStream(NPStream* stream, NPReason reason) { 1504 NPError ChromeFrameNPAPI::DestroyStream(NPStream* stream, NPReason reason) {
1501 return url_fetcher_.DestroyStream(stream, reason); 1505 return url_fetcher_.DestroyStream(stream, reason);
1502 } 1506 }
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame_activex.cc ('k') | chrome_frame/chrome_tab.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698