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

Side by Side Diff: chrome/browser/ui/webui/slideshow_ui.cc

Issue 6672065: Support touch icon in FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some style issues 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 "chrome/browser/ui/webui/slideshow_ui.h" 5 #include "chrome/browser/ui/webui/slideshow_ui.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 if (lister_.get()) { 144 if (lister_.get()) {
145 lister_->Cancel(); 145 lister_->Cancel();
146 lister_->set_delegate(NULL); 146 lister_->set_delegate(NULL);
147 } 147 }
148 } 148 }
149 149
150 WebUIMessageHandler* SlideshowHandler::Attach(WebUI* web_ui) { 150 WebUIMessageHandler* SlideshowHandler::Attach(WebUI* web_ui) {
151 profile_ = web_ui->GetProfile(); 151 profile_ = web_ui->GetProfile();
152 // Create our favicon data source. 152 // Create our favicon data source.
153 profile_->GetChromeURLDataManager()->AddDataSource( 153 profile_->GetChromeURLDataManager()->AddDataSource(
154 new FaviconSource(profile_)); 154 new FaviconSource(profile_, chrome::kChromeUIFaviconHost));
155 return WebUIMessageHandler::Attach(web_ui); 155 return WebUIMessageHandler::Attach(web_ui);
156 } 156 }
157 157
158 void SlideshowHandler::Init() { 158 void SlideshowHandler::Init() {
159 } 159 }
160 160
161 void SlideshowHandler::RegisterMessages() { 161 void SlideshowHandler::RegisterMessages() {
162 web_ui_->RegisterMessageCallback("getChildren", 162 web_ui_->RegisterMessageCallback("getChildren",
163 NewCallback(this, &SlideshowHandler::HandleGetChildren)); 163 NewCallback(this, &SlideshowHandler::HandleGetChildren));
164 web_ui_->RegisterMessageCallback("refreshDirectory", 164 web_ui_->RegisterMessageCallback("refreshDirectory",
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 SlideshowUI::SlideshowUI(TabContents* contents) : WebUI(contents) { 276 SlideshowUI::SlideshowUI(TabContents* contents) : WebUI(contents) {
277 SlideshowHandler* handler = new SlideshowHandler(); 277 SlideshowHandler* handler = new SlideshowHandler();
278 AddMessageHandler((handler)->Attach(this)); 278 AddMessageHandler((handler)->Attach(this));
279 handler->Init(); 279 handler->Init();
280 SlideshowUIHTMLSource* html_source = new SlideshowUIHTMLSource(); 280 SlideshowUIHTMLSource* html_source = new SlideshowUIHTMLSource();
281 281
282 // Set up the chrome://slideshow/ source. 282 // Set up the chrome://slideshow/ source.
283 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); 283 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
284 } 284 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698