diff options
author | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 22:29:32 +0000 |
---|---|---|
committer | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 22:29:32 +0000 |
commit | 07442307cd72bbe129cb87887438e82f146c0773 (patch) | |
tree | 4a526daa929741242fe2a29af1d106cc8e4cc1e3 /chrome/browser/views/extensions | |
parent | 032b2c892ef67add767aa56dcf4f05b06f1f3d15 (diff) | |
download | chromium_src-07442307cd72bbe129cb87887438e82f146c0773.zip chromium_src-07442307cd72bbe129cb87887438e82f146c0773.tar.gz chromium_src-07442307cd72bbe129cb87887438e82f146c0773.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/views/extensions')
-rw-r--r-- | chrome/browser/views/extensions/extension_shelf.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/extensions/extension_view.cc | 8 | ||||
-rw-r--r-- | chrome/browser/views/extensions/extension_view.h | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/views/extensions/extension_shelf.cc b/chrome/browser/views/extensions/extension_shelf.cc index a3ac3bf..229d697 100644 --- a/chrome/browser/views/extensions/extension_shelf.cc +++ b/chrome/browser/views/extensions/extension_shelf.cc @@ -740,7 +740,7 @@ void ExtensionShelf::ThemeChanged() { // Refresh the CSS to update toolstrip text colors from theme. int count = model_->count(); for (int i = 0; i < count; ++i) - ToolstripAtIndex(i)->view()->host()->InsertCssIfToolstrip(); + ToolstripAtIndex(i)->view()->host()->InsertThemeCSS(); Layout(); } 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_); diff --git a/chrome/browser/views/extensions/extension_view.h b/chrome/browser/views/extensions/extension_view.h index 1e08f79..fc1ef90 100644 --- a/chrome/browser/views/extensions/extension_view.h +++ b/chrome/browser/views/extensions/extension_view.h @@ -36,7 +36,7 @@ class ExtensionView : public views::NativeViewHost { Browser* browser() const { return browser_; } Extension* extension() const; RenderViewHost* render_view_host() const; - void SetDidInsertCSS(bool did_insert); + void DidStopLoading(); void set_is_clipped(bool is_clipped) { is_clipped_ = is_clipped; } bool is_toolstrip() const { return is_toolstrip_; } void set_is_toolstrip(bool is) { is_toolstrip_ = is; } @@ -94,8 +94,8 @@ class ExtensionView : public views::NativeViewHost { // Note: the view does not own its container. ExtensionContainer* container_; - // Whether the RenderView has inserted extension css into toolstrip page. - bool did_insert_css_; + // Whether the RenderView has finished loading. + bool did_stop_loading_; // Whether this extension view is clipped. bool is_clipped_; |