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

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 160610: Make extensions in the extension shelf render their content to a visible GTK (Closed)
Patch Set: should be initialized to true to match Windows Created 11 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/extension_shelf_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index f39351716f9675babc7d2977655bf8b4c00b437a..17062ce8c5224c6cc022406a94bc36f986c4dc32 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -219,6 +219,9 @@ void ExtensionHost::DidNavigate(RenderViewHost* render_view_host,
}
void ExtensionHost::DidStopLoading(RenderViewHost* render_view_host) {
+ static const StringPiece toolstrip_css(
+ ResourceBundle::GetSharedInstance().GetRawDataResource(
+ IDR_EXTENSIONS_TOOLSTRIP_CSS));
#if defined(TOOLKIT_VIEWS)
ExtensionView* view = view_.get();
if (view) {
@@ -228,9 +231,6 @@ void ExtensionHost::DidStopLoading(RenderViewHost* render_view_host) {
// As a toolstrip, inject our toolstrip CSS to make it easier for toolstrips
// to blend in with the chrome UI.
if (view->is_toolstrip()) {
- static const StringPiece toolstrip_css(
- ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_EXTENSIONS_TOOLSTRIP_CSS));
render_view_host->InsertCSSInWebFrame(L"", toolstrip_css.as_string());
} else {
// No CSS injecting currently, but call SetDidInsertCSS to tell the view
@@ -238,6 +238,11 @@ void ExtensionHost::DidStopLoading(RenderViewHost* render_view_host) {
view->SetDidInsertCSS(true);
}
}
+#elif defined(OS_LINUX)
+ ExtensionViewGtk* view = view_.get();
+ if (view && view->is_toolstrip()) {
+ render_view_host->InsertCSSInWebFrame(L"", toolstrip_css.as_string());
+ }
#endif
did_stop_loading_ = true;
« no previous file with comments | « no previous file | chrome/browser/gtk/extension_shelf_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698