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

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

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac and win compile errors. Created 8 years, 7 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) 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/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/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 30 matching lines...) Expand all
41 #include "content/public/browser/render_process_host.h" 41 #include "content/public/browser/render_process_host.h"
42 #include "content/public/browser/render_view_host.h" 42 #include "content/public/browser/render_view_host.h"
43 #include "content/public/browser/site_instance.h" 43 #include "content/public/browser/site_instance.h"
44 #include "content/public/browser/web_contents.h" 44 #include "content/public/browser/web_contents.h"
45 #include "content/public/browser/web_contents_view.h" 45 #include "content/public/browser/web_contents_view.h"
46 #include "grit/browser_resources.h" 46 #include "grit/browser_resources.h"
47 #include "grit/chromium_strings.h" 47 #include "grit/chromium_strings.h"
48 #include "grit/generated_resources.h" 48 #include "grit/generated_resources.h"
49 #include "ui/base/keycodes/keyboard_codes.h" 49 #include "ui/base/keycodes/keyboard_codes.h"
50 #include "ui/base/l10n/l10n_util.h" 50 #include "ui/base/l10n/l10n_util.h"
51 #include "ui/base/layout.h"
51 #include "ui/base/resource/resource_bundle.h" 52 #include "ui/base/resource/resource_bundle.h"
52 53
53 #if defined(TOOLKIT_VIEWS) 54 #if defined(TOOLKIT_VIEWS)
54 #include "ui/views/widget/widget.h" 55 #include "ui/views/widget/widget.h"
55 #endif 56 #endif
56 57
57 using WebKit::WebDragOperation; 58 using WebKit::WebDragOperation;
58 using WebKit::WebDragOperationsMask; 59 using WebKit::WebDragOperationsMask;
59 using content::OpenURLParams; 60 using content::OpenURLParams;
60 using content::RenderViewHost; 61 using content::RenderViewHost;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 320 chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
320 content::Source<Profile>(profile_), 321 content::Source<Profile>(profile_),
321 content::Details<ExtensionHost>(this)); 322 content::Details<ExtensionHost>(this));
322 } 323 }
323 324
324 void ExtensionHost::InsertInfobarCSS() { 325 void ExtensionHost::InsertInfobarCSS() {
325 DCHECK(!is_background_page()); 326 DCHECK(!is_background_page());
326 327
327 static const base::StringPiece css( 328 static const base::StringPiece css(
328 ResourceBundle::GetSharedInstance().GetRawDataResource( 329 ResourceBundle::GetSharedInstance().GetRawDataResource(
329 IDR_EXTENSIONS_INFOBAR_CSS)); 330 IDR_EXTENSIONS_INFOBAR_CSS, ui::kScaleFactorNone));
330 331
331 render_view_host()->InsertCSS(string16(), css.as_string()); 332 render_view_host()->InsertCSS(string16(), css.as_string());
332 } 333 }
333 334
334 void ExtensionHost::DidStopLoading() { 335 void ExtensionHost::DidStopLoading() {
335 bool notify = !did_stop_loading_; 336 bool notify = !did_stop_loading_;
336 did_stop_loading_ = true; 337 did_stop_loading_ = true;
337 if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP || 338 if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP ||
338 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG || 339 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG ||
339 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR || 340 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR ||
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 params.user_gesture = user_gesture; 586 params.user_gesture = user_gesture;
586 browser::Navigate(&params); 587 browser::Navigate(&params);
587 } 588 }
588 589
589 void ExtensionHost::RenderViewReady() { 590 void ExtensionHost::RenderViewReady() {
590 content::NotificationService::current()->Notify( 591 content::NotificationService::current()->Notify(
591 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 592 chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
592 content::Source<Profile>(profile_), 593 content::Source<Profile>(profile_),
593 content::Details<ExtensionHost>(this)); 594 content::Details<ExtensionHost>(this));
594 } 595 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698