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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 12780024: Split FaviconHelper in two: ImageLoadingHelper and FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: caitp feedback Created 7 years, 8 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/ui/extensions/shell_window.h" 5 #include "chrome/browser/ui/extensions/shell_window.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/app_window_contents.h" 9 #include "chrome/browser/extensions/app_window_contents.h"
10 #include "chrome/browser/extensions/extension_process_manager.h" 10 #include "chrome/browser/extensions/extension_process_manager.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 string16 title = web_contents()->GetTitle(); 354 string16 title = web_contents()->GetTitle();
355 Browser::FormatTitleForDisplay(&title); 355 Browser::FormatTitleForDisplay(&title);
356 return title; 356 return title;
357 } 357 }
358 358
359 void ShellWindow::SetAppIconUrl(const GURL& url) { 359 void ShellWindow::SetAppIconUrl(const GURL& url) {
360 // Avoid using any previous app icons were are being downloaded. 360 // Avoid using any previous app icons were are being downloaded.
361 image_loader_ptr_factory_.InvalidateWeakPtrs(); 361 image_loader_ptr_factory_.InvalidateWeakPtrs();
362 362
363 app_icon_url_ = url; 363 app_icon_url_ = url;
364 web_contents()->DownloadFavicon( 364 web_contents()->DownloadImage(
365 url, true, kPreferredIconSize, 365 url, true, kPreferredIconSize,
366 base::Bind(&ShellWindow::DidDownloadFavicon, 366 base::Bind(&ShellWindow::DidDownloadFavicon,
367 image_loader_ptr_factory_.GetWeakPtr())); 367 image_loader_ptr_factory_.GetWeakPtr()));
368 } 368 }
369 369
370 void ShellWindow::UpdateDraggableRegions( 370 void ShellWindow::UpdateDraggableRegions(
371 const std::vector<extensions::DraggableRegion>& regions) { 371 const std::vector<extensions::DraggableRegion>& regions) {
372 native_app_window_->UpdateDraggableRegions(regions); 372 native_app_window_->UpdateDraggableRegions(regions);
373 } 373 }
374 374
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 const extensions::DraggableRegion& region = *iter; 532 const extensions::DraggableRegion& region = *iter;
533 sk_region->op( 533 sk_region->op(
534 region.bounds.x(), 534 region.bounds.x(),
535 region.bounds.y(), 535 region.bounds.y(),
536 region.bounds.right(), 536 region.bounds.right(),
537 region.bounds.bottom(), 537 region.bounds.bottom(),
538 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 538 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
539 } 539 }
540 return sk_region; 540 return sk_region;
541 } 541 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_favicon_loader.cc ('k') | chrome/browser/ui/metro_pin_tab_helper_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698