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

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

Issue 12945007: Fix Notifications Icon loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing 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()->DownloadFavicon(url,
362 true,
363 kPreferredIconSize,
362 base::Bind(&ShellWindow::DidDownloadFavicon, 364 base::Bind(&ShellWindow::DidDownloadFavicon,
363 weak_ptr_factory_.GetWeakPtr())); 365 weak_ptr_factory_.GetWeakPtr()));
364 } 366 }
365 367
366 void ShellWindow::UpdateDraggableRegions( 368 void ShellWindow::UpdateDraggableRegions(
367 const std::vector<extensions::DraggableRegion>& regions) { 369 const std::vector<extensions::DraggableRegion>& regions) {
368 native_app_window_->UpdateDraggableRegions(regions); 370 native_app_window_->UpdateDraggableRegions(regions);
369 } 371 }
370 372
371 void ShellWindow::UpdateAppIcon(const gfx::Image& image) { 373 void ShellWindow::UpdateAppIcon(const gfx::Image& image) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 const extensions::DraggableRegion& region = *iter; 530 const extensions::DraggableRegion& region = *iter;
529 sk_region->op( 531 sk_region->op(
530 region.bounds.x(), 532 region.bounds.x(),
531 region.bounds.y(), 533 region.bounds.y(),
532 region.bounds.right(), 534 region.bounds.right(),
533 region.bounds.bottom(), 535 region.bounds.bottom(),
534 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 536 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
535 } 537 }
536 return sk_region; 538 return sk_region;
537 } 539 }
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