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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 6651014: Applied the IconType. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 Profile::IMPLICIT_ACCESS); 851 Profile::IMPLICIT_ACCESS);
852 if (!service) 852 if (!service)
853 return; 853 return;
854 const NavigationEntry::FaviconStatus& favicon(entry->favicon()); 854 const NavigationEntry::FaviconStatus& favicon(entry->favicon());
855 if (!favicon.is_valid() || favicon.url().is_empty() || 855 if (!favicon.is_valid() || favicon.url().is_empty() ||
856 favicon.bitmap().empty()) { 856 favicon.bitmap().empty()) {
857 return; 857 return;
858 } 858 }
859 std::vector<unsigned char> image_data; 859 std::vector<unsigned char> image_data;
860 gfx::PNGCodec::EncodeBGRASkBitmap(favicon.bitmap(), false, &image_data); 860 gfx::PNGCodec::EncodeBGRASkBitmap(favicon.bitmap(), false, &image_data);
861 service->SetFavicon(entry->url(), favicon.url(), image_data); 861 service->SetFavicon(
862 entry->url(), favicon.url(), image_data, history::FAV_ICON);
862 } 863 }
863 864
864 ConstrainedWindow* TabContents::CreateConstrainedDialog( 865 ConstrainedWindow* TabContents::CreateConstrainedDialog(
865 ConstrainedWindowDelegate* delegate) { 866 ConstrainedWindowDelegate* delegate) {
866 ConstrainedWindow* window = 867 ConstrainedWindow* window =
867 ConstrainedWindow::CreateConstrainedDialog(this, delegate); 868 ConstrainedWindow::CreateConstrainedDialog(this, delegate);
868 AddConstrainedDialog(window); 869 AddConstrainedDialog(window);
869 return window; 870 return window;
870 } 871 }
871 872
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 } 2853 }
2853 2854
2854 bool TabContents::MaybeUsePreloadedPage(const GURL& url) { 2855 bool TabContents::MaybeUsePreloadedPage(const GURL& url) {
2855 prerender::PrerenderManager* pm = profile()->GetPrerenderManager(); 2856 prerender::PrerenderManager* pm = profile()->GetPrerenderManager();
2856 if (pm != NULL) { 2857 if (pm != NULL) {
2857 if (pm->MaybeUsePreloadedPage(this, url)) 2858 if (pm->MaybeUsePreloadedPage(this, url))
2858 return true; 2859 return true;
2859 } 2860 }
2860 return false; 2861 return false;
2861 } 2862 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698