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

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 7517001: Switch from WebDocument::insertStyleText to ::insertUserStyleSheet for programatic CSS injection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 340
341 void ExtensionHost::InsertInfobarCSS() { 341 void ExtensionHost::InsertInfobarCSS() {
342 DCHECK(!is_background_page()); 342 DCHECK(!is_background_page());
343 343
344 static const base::StringPiece css( 344 static const base::StringPiece css(
345 ResourceBundle::GetSharedInstance().GetRawDataResource( 345 ResourceBundle::GetSharedInstance().GetRawDataResource(
346 IDR_EXTENSIONS_INFOBAR_CSS)); 346 IDR_EXTENSIONS_INFOBAR_CSS));
347 347
348 render_view_host()->Send(new ViewMsg_CSSInsertRequest( 348 render_view_host()->Send(new ViewMsg_CSSInsertRequest(
349 render_view_host()->routing_id(), L"", css.as_string(), 349 render_view_host()->routing_id(), L"", css.as_string()));
350 "InfobarThemeCSS"));
351 } 350 }
352 351
353 void ExtensionHost::DisableScrollbarsForSmallWindows( 352 void ExtensionHost::DisableScrollbarsForSmallWindows(
354 const gfx::Size& size_limit) { 353 const gfx::Size& size_limit) {
355 render_view_host()->Send(new ViewMsg_DisableScrollbarsForSmallWindows( 354 render_view_host()->Send(new ViewMsg_DisableScrollbarsForSmallWindows(
356 render_view_host()->routing_id(), size_limit)); 355 render_view_host()->routing_id(), size_limit));
357 } 356 }
358 357
359 void ExtensionHost::DidStopLoading() { 358 void ExtensionHost::DidStopLoading() {
360 bool notify = !did_stop_loading_; 359 bool notify = !did_stop_loading_;
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 } 785 }
787 } 786 }
788 787
789 void ExtensionHost::OnRunFileChooser( 788 void ExtensionHost::OnRunFileChooser(
790 const ViewHostMsg_RunFileChooser_Params& params) { 789 const ViewHostMsg_RunFileChooser_Params& params) {
791 if (file_select_helper_.get() == NULL) 790 if (file_select_helper_.get() == NULL)
792 file_select_helper_.reset(new FileSelectHelper(profile())); 791 file_select_helper_.reset(new FileSelectHelper(profile()));
793 file_select_helper_->RunFileChooser(render_view_host_, 792 file_select_helper_->RunFileChooser(render_view_host_,
794 GetAssociatedTabContents(), params); 793 GetAssociatedTabContents(), params);
795 } 794 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698