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

Side by Side Diff: chrome/browser/ui/views/extensions/shell_window_views.cc

Issue 11011002: Switch FaviconTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 2 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/views/extensions/shell_window_views.h" 5 #include "chrome/browser/ui/views/extensions/shell_window_views.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents.h"
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 gfx::Image app_icon = shell_window_->app_icon(); 588 gfx::Image app_icon = shell_window_->app_icon();
589 if (app_icon.IsEmpty()) 589 if (app_icon.IsEmpty())
590 return GetWindowIcon(); 590 return GetWindowIcon();
591 else 591 else
592 return *app_icon.ToImageSkia(); 592 return *app_icon.ToImageSkia();
593 } 593 }
594 594
595 gfx::ImageSkia ShellWindowViews::GetWindowIcon() { 595 gfx::ImageSkia ShellWindowViews::GetWindowIcon() {
596 TabContents* contents = shell_window_->tab_contents(); 596 TabContents* contents = shell_window_->tab_contents();
597 if (contents) { 597 if (contents) {
598 gfx::Image app_icon = contents->favicon_tab_helper()->GetFavicon(); 598 FaviconTabHelper* favicon_tab_helper =
599 FaviconTabHelper::FromWebContents(contents->web_contents());
600 gfx::Image app_icon = favicon_tab_helper->GetFavicon();
599 if (!app_icon.IsEmpty()) 601 if (!app_icon.IsEmpty())
600 return *app_icon.ToImageSkia(); 602 return *app_icon.ToImageSkia();
601 } 603 }
602 return gfx::ImageSkia(); 604 return gfx::ImageSkia();
603 } 605 }
604 606
605 bool ShellWindowViews::ShouldShowWindowTitle() const { 607 bool ShellWindowViews::ShouldShowWindowTitle() const {
606 return false; 608 return false;
607 } 609 }
608 610
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 ui::WindowShowState show_state) { 687 ui::WindowShowState show_state) {
686 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); 688 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state);
687 shell_window_->SaveWindowPosition(); 689 shell_window_->SaveWindowPosition();
688 } 690 }
689 691
690 // static 692 // static
691 NativeShellWindow* NativeShellWindow::Create( 693 NativeShellWindow* NativeShellWindow::Create(
692 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { 694 ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
693 return new ShellWindowViews(shell_window, params); 695 return new ShellWindowViews(shell_window, params);
694 } 696 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/create_application_shortcut_view.cc ('k') | chrome/browser/ui/views/hung_renderer_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698