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

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: Convert ptr to bool for win compile. 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/resource/resource_bundle.h" 51 #include "ui/base/resource/resource_bundle.h"
52 #include "ui/base/resource/resource_handle.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;
61 using content::SiteInstance; 62 using content::SiteInstance;
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 315 chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
315 content::Source<Profile>(profile_), 316 content::Source<Profile>(profile_),
316 content::Details<ExtensionHost>(this)); 317 content::Details<ExtensionHost>(this));
317 } 318 }
318 319
319 void ExtensionHost::InsertInfobarCSS() { 320 void ExtensionHost::InsertInfobarCSS() {
320 DCHECK(!is_background_page()); 321 DCHECK(!is_background_page());
321 322
322 static const base::StringPiece css( 323 static const base::StringPiece css(
323 ResourceBundle::GetSharedInstance().GetRawDataResource( 324 ResourceBundle::GetSharedInstance().GetRawDataResource(
324 IDR_EXTENSIONS_INFOBAR_CSS)); 325 IDR_EXTENSIONS_INFOBAR_CSS, ui::ResourceHandle::kScaleFactorNone));
325 326
326 render_view_host()->InsertCSS(string16(), css.as_string()); 327 render_view_host()->InsertCSS(string16(), css.as_string());
327 } 328 }
328 329
329 void ExtensionHost::DidStopLoading() { 330 void ExtensionHost::DidStopLoading() {
330 bool notify = !did_stop_loading_; 331 bool notify = !did_stop_loading_;
331 did_stop_loading_ = true; 332 did_stop_loading_ = true;
332 if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP || 333 if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP ||
333 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG || 334 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG ||
334 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR || 335 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR ||
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 params.user_gesture = user_gesture; 576 params.user_gesture = user_gesture;
576 browser::Navigate(&params); 577 browser::Navigate(&params);
577 } 578 }
578 579
579 void ExtensionHost::RenderViewReady() { 580 void ExtensionHost::RenderViewReady() {
580 content::NotificationService::current()->Notify( 581 content::NotificationService::current()->Notify(
581 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 582 chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
582 content::Source<Profile>(profile_), 583 content::Source<Profile>(profile_),
583 content::Details<ExtensionHost>(this)); 584 content::Details<ExtensionHost>(this));
584 } 585 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698