From 07442307cd72bbe129cb87887438e82f146c0773 Mon Sep 17 00:00:00 2001 From: "erikkay@chromium.org" Date: Fri, 18 Sep 2009 22:29:32 +0000 Subject: Change the view mode when switching between moles and toolstrips, and propogate this into the class of the document element so that it's possible to use CSS rules to control the display of your toolstrip/mole. BUG=21939,15494 TEST=run the Mappy extension and verify it can open and close Review URL: http://codereview.chromium.org/208020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26635 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/extensions/extension_view.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome/browser/views/extensions/extension_view.cc') diff --git a/chrome/browser/views/extensions/extension_view.cc b/chrome/browser/views/extensions/extension_view.cc index 7b39336..4302c93 100644 --- a/chrome/browser/views/extensions/extension_view.cc +++ b/chrome/browser/views/extensions/extension_view.cc @@ -15,7 +15,7 @@ ExtensionView::ExtensionView(ExtensionHost* host, Browser* browser) : host_(host), browser_(browser), initialized_(false), pending_preferred_width_(0), container_(NULL), - did_insert_css_(false), is_clipped_(false), is_toolstrip_(true) { + did_stop_loading_(false), is_clipped_(false), is_toolstrip_(true) { host_->set_view(this); } @@ -34,8 +34,8 @@ RenderViewHost* ExtensionView::render_view_host() const { return host_->render_view_host(); } -void ExtensionView::SetDidInsertCSS(bool did_insert) { - did_insert_css_ = did_insert; +void ExtensionView::DidStopLoading() { + did_stop_loading_ = true; ShowIfCompletelyLoaded(); } @@ -100,7 +100,7 @@ void ExtensionView::ShowIfCompletelyLoaded() { // given us a background and css has been inserted into page. These can happen // in different orders. if (!IsVisible() && host_->did_stop_loading() && render_view_host()->view() && - !is_clipped_ && did_insert_css_ && + !is_clipped_ && did_stop_loading_ && !render_view_host()->view()->background().empty()) { SetVisible(true); UpdatePreferredWidth(pending_preferred_width_); -- cgit v1.1