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

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

Issue 188923002: Move RenderViewHost::InsertCSS to RenderFrameHost. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_view_host.h" 5 #include "chrome/browser/extensions/extension_view_host.h"
6 6
7 #include "base/strings/string_piece.h" 7 #include "base/strings/string_piece.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/window_controller.h" 9 #include "chrome/browser/extensions/window_controller.h"
10 #include "chrome/browser/file_select_helper.h" 10 #include "chrome/browser/file_select_helper.h"
11 #include "chrome/browser/platform_util.h" 11 #include "chrome/browser/platform_util.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_dialogs.h" 13 #include "chrome/browser/ui/browser_dialogs.h"
14 #include "chrome/common/extensions/extension_messages.h" 14 #include "chrome/common/extensions/extension_messages.h"
15 #include "components/web_modal/web_contents_modal_dialog_manager.h" 15 #include "components/web_modal/web_contents_modal_dialog_manager.h"
16 #include "content/public/browser/notification_source.h" 16 #include "content/public/browser/notification_source.h"
17 #include "content/public/browser/render_frame_host.h"
17 #include "content/public/browser/render_view_host.h" 18 #include "content/public/browser/render_view_host.h"
18 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
19 #include "content/public/browser/web_contents_view.h" 20 #include "content/public/browser/web_contents_view.h"
20 #include "extensions/browser/extension_system.h" 21 #include "extensions/browser/extension_system.h"
21 #include "extensions/browser/runtime_data.h" 22 #include "extensions/browser/runtime_data.h"
22 #include "grit/browser_resources.h" 23 #include "grit/browser_resources.h"
23 #include "ui/base/resource/resource_bundle.h" 24 #include "ui/base/resource/resource_bundle.h"
24 #include "ui/events/keycodes/keyboard_codes.h" 25 #include "ui/events/keycodes/keyboard_codes.h"
25 26
26 using content::NativeWebKeyboardEvent; 27 using content::NativeWebKeyboardEvent;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 return; 327 return;
327 } 328 }
328 ExtensionHost::Observe(type, source, details); 329 ExtensionHost::Observe(type, source, details);
329 } 330 }
330 331
331 void ExtensionViewHost::InsertInfobarCSS() { 332 void ExtensionViewHost::InsertInfobarCSS() {
332 static const base::StringPiece css( 333 static const base::StringPiece css(
333 ResourceBundle::GetSharedInstance().GetRawDataResource( 334 ResourceBundle::GetSharedInstance().GetRawDataResource(
334 IDR_EXTENSIONS_INFOBAR_CSS)); 335 IDR_EXTENSIONS_INFOBAR_CSS));
335 336
336 render_view_host()->InsertCSS(base::string16(), css.as_string()); 337 host_contents()->GetMainFrame()->InsertCSS(css.as_string());
jam 2014/03/06 21:48:48 we're sure that doing this just for the main frame
Avi (use Gerrit) 2014/03/06 21:53:23 OK. FYI, though, this is exactly what happens toda
jam 2014/03/06 21:56:29 ah i missed that, lgtm
337 } 338 }
338 339
339 } // namespace extensions 340 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.h » ('j') | content/common/frame_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698