summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 22:25:54 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 22:25:54 +0000
commitc62e2ab24534fa0f2c37fae060bc6c17e1990d0a (patch)
treeacd03cedbb948f4e4a0eba59f3ab01ab82221074 /chrome_frame
parent93a65ac3bc0a38129fb8fb7ec2fb61b969a895c0 (diff)
downloadchromium_src-c62e2ab24534fa0f2c37fae060bc6c17e1990d0a.zip
chromium_src-c62e2ab24534fa0f2c37fae060bc6c17e1990d0a.tar.gz
chromium_src-c62e2ab24534fa0f2c37fae060bc6c17e1990d0a.tar.bz2
Reverting as this causes chrome frame unit tests to crash. Please fix and resubmit
Revert 66002 - Change the FF CEEE to create its chrome frame instance initially hidden, and make it visible only once the content is done loading. This avoids any flicker at startup, and fixes a bug where the chrome frame instance is removed after a print preview. Also added support to chrome frame to send an uninitialized ready state when its being torn down. BUG=62979 TEST=Make sure that there is no UI flicker on chrome frame startup, and make sure that the extenions works correct after showing print preview and closing it. Review URL: http://codereview.chromium.org/4882004 TBR=rogerta@chromium.org Review URL: http://codereview.chromium.org/4855005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66010 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_frame_npapi.cc7
-rw-r--r--chrome_frame/np_event_listener.cc8
2 files changed, 6 insertions, 9 deletions
diff --git a/chrome_frame/chrome_frame_npapi.cc b/chrome_frame/chrome_frame_npapi.cc
index c153993..ea7217f 100644
--- a/chrome_frame/chrome_frame_npapi.cc
+++ b/chrome_frame/chrome_frame_npapi.cc
@@ -290,8 +290,9 @@ bool ChromeFrameNPAPI::Initialize(NPMIMEType mime_type, NPP instance,
}
void ChromeFrameNPAPI::Uninitialize() {
- if (ready_state_ != READYSTATE_UNINITIALIZED)
- SetReadyState(READYSTATE_UNINITIALIZED);
+ // Don't call SetReadyState as it will end up calling FireEvent.
+ // We are in the context of NPP_DESTROY.
+ ready_state_ = READYSTATE_UNINITIALIZED;
UnsubscribeFromFocusEvents();
@@ -850,7 +851,7 @@ void ChromeFrameNPAPI::OnMessageFromChromeFrame(int tab_handle,
}
DLOG_IF(WARNING, !invoke) << "InvokeDefault failed";
} else {
- DLOG(WARNING) << "CreateMessageEvent failed, probably exiting";
+ NOTREACHED() << "CreateMessageEvent";
}
}
diff --git a/chrome_frame/np_event_listener.cc b/chrome_frame/np_event_listener.cc
index cfbaded..937ca1d 100644
--- a/chrome_frame/np_event_listener.cc
+++ b/chrome_frame/np_event_listener.cc
@@ -172,13 +172,9 @@ NPObject* NPObjectEventListener::GetObjectElement(NPP instance) {
// We've got the <embed> element but we really want
// the <object> element.
if (npapi::GetProperty(instance, object, ids[PARENT_ELEMENT], &var)) {
+ DCHECK(NPVARIANT_IS_OBJECT(var));
npapi::ReleaseObject(object);
- object = NULL;
- if (NPVARIANT_IS_OBJECT(var)) {
- object = NPVARIANT_TO_OBJECT(var);
- } else {
- DVLOG(1) << __FUNCTION__ << " Could not find our parent";
- }
+ object = NPVARIANT_TO_OBJECT(var);
}
} else {
DVLOG(1) << __FUNCTION__ << " got " << tag;