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

Side by Side Diff: content/browser/webui/web_ui_factory.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/webui/web_ui_factory.h" 5 #include "content/browser/webui/web_ui_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/about_flags.h" 8 #include "chrome/browser/about_flags.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_web_ui.h" 10 #include "chrome/browser/extensions/extension_web_ui.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // part of the manifest. 288 // part of the manifest.
289 if (page_url.SchemeIs(chrome::kExtensionScheme) && 289 if (page_url.SchemeIs(chrome::kExtensionScheme) &&
290 page_url.host() != extension_misc::kBookmarkManagerId) { 290 page_url.host() != extension_misc::kBookmarkManagerId) {
291 ExtensionWebUI::GetFaviconForURL(profile, request, page_url); 291 ExtensionWebUI::GetFaviconForURL(profile, request, page_url);
292 } else { 292 } else {
293 scoped_refptr<RefCountedMemory> icon_data( 293 scoped_refptr<RefCountedMemory> icon_data(
294 WebUIFactory::GetFaviconResourceBytes(profile, page_url)); 294 WebUIFactory::GetFaviconResourceBytes(profile, page_url));
295 bool know_icon = icon_data.get() != NULL && icon_data->size() > 0; 295 bool know_icon = icon_data.get() != NULL && icon_data->size() > 0;
296 request->ForwardResultAsync( 296 request->ForwardResultAsync(
297 FaviconService::FaviconDataCallback::TupleType(request->handle(), 297 FaviconService::FaviconDataCallback::TupleType(request->handle(),
298 know_icon, icon_data, false, GURL())); 298 know_icon, icon_data, false, GURL(), history::FAV_ICON));
299 } 299 }
300 } 300 }
301 301
302 // static 302 // static
303 RefCountedMemory* WebUIFactory::GetFaviconResourceBytes(Profile* profile, 303 RefCountedMemory* WebUIFactory::GetFaviconResourceBytes(Profile* profile,
304 const GURL& page_url) { 304 const GURL& page_url) {
305 // The bookmark manager is a chrome extension, so we have to check for it 305 // The bookmark manager is a chrome extension, so we have to check for it
306 // before we check for extension scheme. 306 // before we check for extension scheme.
307 if (page_url.host() == extension_misc::kBookmarkManagerId) 307 if (page_url.host() == extension_misc::kBookmarkManagerId)
308 return BookmarksUI::GetFaviconResourceBytes(); 308 return BookmarksUI::GetFaviconResourceBytes();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 if (page_url.host() == chrome::kChromeUIPluginsHost) 345 if (page_url.host() == chrome::kChromeUIPluginsHost)
346 return PluginsUI::GetFaviconResourceBytes(); 346 return PluginsUI::GetFaviconResourceBytes();
347 347
348 #if defined(ENABLE_REMOTING) 348 #if defined(ENABLE_REMOTING)
349 if (page_url.host() == chrome::kChromeUIRemotingHost) 349 if (page_url.host() == chrome::kChromeUIRemotingHost)
350 return RemotingUI::GetFaviconResourceBytes(); 350 return RemotingUI::GetFaviconResourceBytes();
351 #endif 351 #endif
352 352
353 return NULL; 353 return NULL;
354 } 354 }
OLDNEW
« chrome/browser/ui/webui/favicon_source.cc ('K') | « content/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698