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

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

Issue 10843014: Generalize ExtensionIconSet to store icon paths for custom size sets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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/tab_helper.h" 5 #include "chrome/browser/extensions/tab_helper.h"
6 6
7 #include "chrome/browser/extensions/crx_installer.h" 7 #include "chrome/browser/extensions/crx_installer.h"
8 #include "chrome/browser/extensions/app_notify_channel_ui.h" 8 #include "chrome/browser/extensions/app_notify_channel_ui.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_tab_util.h" 10 #include "chrome/browser/extensions/extension_tab_util.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 return extension; 365 return extension;
366 } 366 }
367 367
368 void TabHelper::UpdateExtensionAppIcon(const Extension* extension) { 368 void TabHelper::UpdateExtensionAppIcon(const Extension* extension) {
369 extension_app_icon_.reset(); 369 extension_app_icon_.reset();
370 370
371 if (extension) { 371 if (extension) {
372 extension_app_image_loader_.reset(new ImageLoadingTracker(this)); 372 extension_app_image_loader_.reset(new ImageLoadingTracker(this));
373 extension_app_image_loader_->LoadImage( 373 extension_app_image_loader_->LoadImage(
374 extension, 374 extension,
375 extension->GetIconResource(ExtensionIconSet::EXTENSION_ICON_SMALLISH, 375 extension->GetIconResource(extension_misc::EXTENSION_ICON_SMALLISH,
376 ExtensionIconSet::MATCH_EXACTLY), 376 ExtensionIconSet::MATCH_EXACTLY),
377 gfx::Size(ExtensionIconSet::EXTENSION_ICON_SMALLISH, 377 gfx::Size(extension_misc::EXTENSION_ICON_SMALLISH,
378 ExtensionIconSet::EXTENSION_ICON_SMALLISH), 378 extension_misc::EXTENSION_ICON_SMALLISH),
379 ImageLoadingTracker::CACHE); 379 ImageLoadingTracker::CACHE);
380 } else { 380 } else {
381 extension_app_image_loader_.reset(NULL); 381 extension_app_image_loader_.reset(NULL);
382 } 382 }
383 } 383 }
384 384
385 void TabHelper::SetAppIcon(const SkBitmap& app_icon) { 385 void TabHelper::SetAppIcon(const SkBitmap& app_icon) {
386 extension_app_icon_ = app_icon; 386 extension_app_icon_ = app_icon;
387 web_contents()->NotifyNavigationStateChanged(content::INVALIDATE_TYPE_TITLE); 387 web_contents()->NotifyNavigationStateChanged(content::INVALIDATE_TYPE_TITLE);
388 } 388 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // malware site etc). When this happens, we abort the shortcut update. 435 // malware site etc). When this happens, we abort the shortcut update.
436 NavigationEntry* entry = controller.GetLastCommittedEntry(); 436 NavigationEntry* entry = controller.GetLastCommittedEntry();
437 if (entry) 437 if (entry)
438 GetApplicationInfo(entry->GetPageID()); 438 GetApplicationInfo(entry->GetPageID());
439 else 439 else
440 pending_web_app_action_ = NONE; 440 pending_web_app_action_ = NONE;
441 } 441 }
442 } 442 }
443 443
444 } // namespace extensions 444 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/image_loading_tracker_unittest.cc ('k') | chrome/browser/ui/ash/app_list/extension_app_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698