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

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: Rebaseline 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
« no previous file with comments | « no previous file | chrome/renderer/extensions/user_script_idle_scheduler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 341
342 void ExtensionHost::InsertInfobarCSS() { 342 void ExtensionHost::InsertInfobarCSS() {
343 DCHECK(!is_background_page()); 343 DCHECK(!is_background_page());
344 344
345 static const base::StringPiece css( 345 static const base::StringPiece css(
346 ResourceBundle::GetSharedInstance().GetRawDataResource( 346 ResourceBundle::GetSharedInstance().GetRawDataResource(
347 IDR_EXTENSIONS_INFOBAR_CSS)); 347 IDR_EXTENSIONS_INFOBAR_CSS));
348 348
349 render_view_host()->Send(new ViewMsg_CSSInsertRequest( 349 render_view_host()->Send(new ViewMsg_CSSInsertRequest(
350 render_view_host()->routing_id(), L"", css.as_string(), 350 render_view_host()->routing_id(), L"", css.as_string()));
351 "InfobarThemeCSS"));
352 } 351 }
353 352
354 void ExtensionHost::DisableScrollbarsForSmallWindows( 353 void ExtensionHost::DisableScrollbarsForSmallWindows(
355 const gfx::Size& size_limit) { 354 const gfx::Size& size_limit) {
356 render_view_host()->Send(new ViewMsg_DisableScrollbarsForSmallWindows( 355 render_view_host()->Send(new ViewMsg_DisableScrollbarsForSmallWindows(
357 render_view_host()->routing_id(), size_limit)); 356 render_view_host()->routing_id(), size_limit));
358 } 357 }
359 358
360 void ExtensionHost::DidStopLoading() { 359 void ExtensionHost::DidStopLoading() {
361 bool notify = !did_stop_loading_; 360 bool notify = !did_stop_loading_;
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 } 790 }
792 } 791 }
793 792
794 void ExtensionHost::OnRunFileChooser( 793 void ExtensionHost::OnRunFileChooser(
795 const ViewHostMsg_RunFileChooser_Params& params) { 794 const ViewHostMsg_RunFileChooser_Params& params) {
796 if (file_select_helper_.get() == NULL) 795 if (file_select_helper_.get() == NULL)
797 file_select_helper_.reset(new FileSelectHelper(profile())); 796 file_select_helper_.reset(new FileSelectHelper(profile()));
798 file_select_helper_->RunFileChooser(render_view_host_, 797 file_select_helper_->RunFileChooser(render_view_host_,
799 GetAssociatedTabContents(), params); 798 GetAssociatedTabContents(), params);
800 } 799 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/user_script_idle_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698