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

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: fix build Created 7 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 | 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 !web_contents()->GetController().GetActiveEntry() || 351 !web_contents()->GetController().GetActiveEntry() ||
352 web_contents()->GetController().GetActiveEntry()->GetTitle().empty()) 352 web_contents()->GetController().GetActiveEntry()->GetTitle().empty())
353 return UTF8ToUTF16(extension()->name()); 353 return UTF8ToUTF16(extension()->name());
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 app_icon_url_ = url; 360 app_icon_url_ = url;
361 web_contents()->DownloadFavicon(url, kPreferredIconSize, 361 web_contents()->DownloadImage(url, kPreferredIconSize,
362 base::Bind(&ShellWindow::DidDownloadFavicon, 362 base::Bind(&ShellWindow::DidDownloadFavicon,
363 weak_ptr_factory_.GetWeakPtr())); 363 weak_ptr_factory_.GetWeakPtr()));
364 } 364 }
365 365
366 void ShellWindow::UpdateDraggableRegions( 366 void ShellWindow::UpdateDraggableRegions(
367 const std::vector<extensions::DraggableRegion>& regions) { 367 const std::vector<extensions::DraggableRegion>& regions) {
368 native_app_window_->UpdateDraggableRegions(regions); 368 native_app_window_->UpdateDraggableRegions(regions);
369 } 369 }
370 370
371 void ShellWindow::UpdateAppIcon(const gfx::Image& image) { 371 void ShellWindow::UpdateAppIcon(const gfx::Image& image) {
372 if (image.IsEmpty()) 372 if (image.IsEmpty())
373 return; 373 return;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 const extensions::DraggableRegion& region = *iter; 528 const extensions::DraggableRegion& region = *iter;
529 sk_region->op( 529 sk_region->op(
530 region.bounds.x(), 530 region.bounds.x(),
531 region.bounds.y(), 531 region.bounds.y(),
532 region.bounds.right(), 532 region.bounds.right(),
533 region.bounds.bottom(), 533 region.bounds.bottom(),
534 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 534 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
535 } 535 }
536 return sk_region; 536 return sk_region;
537 } 537 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698