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

Side by Side Diff: chrome/renderer/extensions/dispatcher.cc

Issue 64843004: Get rid of user-level styles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to ToT Created 7 years, 1 month 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 | « chrome/chrome_tests_unit.gypi ('k') | content/public/common/common_param_traits_macros.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/extensions/dispatcher.h" 5 #include "chrome/renderer/extensions/dispatcher.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 // insert the default platform app stylesheet into all documents that are 1267 // insert the default platform app stylesheet into all documents that are
1268 // loaded in each app. 1268 // loaded in each app.
1269 std::string stylesheet = 1269 std::string stylesheet =
1270 ResourceBundle::GetSharedInstance(). 1270 ResourceBundle::GetSharedInstance().
1271 GetRawDataResource(IDR_PLATFORM_APP_CSS).as_string(); 1271 GetRawDataResource(IDR_PLATFORM_APP_CSS).as_string();
1272 ReplaceFirstSubstringAfterOffset(&stylesheet, 0, 1272 ReplaceFirstSubstringAfterOffset(&stylesheet, 0,
1273 "$FONTFAMILY", system_font_family_); 1273 "$FONTFAMILY", system_font_family_);
1274 ReplaceFirstSubstringAfterOffset(&stylesheet, 0, 1274 ReplaceFirstSubstringAfterOffset(&stylesheet, 0,
1275 "$FONTSIZE", system_font_size_); 1275 "$FONTSIZE", system_font_size_);
1276 frame->document().insertUserStyleSheet( 1276 frame->document().insertUserStyleSheet(
1277 WebString::fromUTF8(stylesheet), WebDocument::UserStyleUserLevel); 1277 WebString::fromUTF8(stylesheet), WebDocument::UserStyleAuthorLevel);
1278 } 1278 }
1279 1279
1280 content_watcher_->DidCreateDocumentElement(frame); 1280 content_watcher_->DidCreateDocumentElement(frame);
1281 } 1281 }
1282 1282
1283 void Dispatcher::DidMatchCSS( 1283 void Dispatcher::DidMatchCSS(
1284 blink::WebFrame* frame, 1284 blink::WebFrame* frame,
1285 const blink::WebVector<blink::WebString>& newly_matching_selectors, 1285 const blink::WebVector<blink::WebString>& newly_matching_selectors,
1286 const blink::WebVector<blink::WebString>& stopped_matching_selectors) { 1286 const blink::WebVector<blink::WebString>& stopped_matching_selectors) {
1287 content_watcher_->DidMatchCSS( 1287 content_watcher_->DidMatchCSS(
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 RenderView* background_view = 1632 RenderView* background_view =
1633 ExtensionHelper::GetBackgroundPage(extension_id); 1633 ExtensionHelper::GetBackgroundPage(extension_id);
1634 if (background_view) { 1634 if (background_view) {
1635 background_view->Send(new ExtensionHostMsg_EventAck( 1635 background_view->Send(new ExtensionHostMsg_EventAck(
1636 background_view->GetRoutingID())); 1636 background_view->GetRoutingID()));
1637 } 1637 }
1638 } 1638 }
1639 } 1639 }
1640 1640
1641 } // namespace extensions 1641 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698