| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // content::URLDataSource implementation. | 30 // content::URLDataSource implementation. |
| 31 virtual std::string GetSource() OVERRIDE; | 31 virtual std::string GetSource() OVERRIDE; |
| 32 virtual void StartDataRequest( | 32 virtual void StartDataRequest( |
| 33 const std::string& path, | 33 const std::string& path, |
| 34 bool is_incognito, | 34 bool is_incognito, |
| 35 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; | 35 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; |
| 36 virtual std::string GetMimeType(const std::string& path) const OVERRIDE; | 36 virtual std::string GetMimeType(const std::string& path) const OVERRIDE; |
| 37 virtual MessageLoop* MessageLoopForRequestPath( | 37 virtual MessageLoop* MessageLoopForRequestPath( |
| 38 const std::string& path) const OVERRIDE; | 38 const std::string& path) const OVERRIDE; |
| 39 virtual bool ShouldServiceRequest( |
| 40 const net::URLRequest* request) const OVERRIDE; |
| 39 | 41 |
| 40 private: | 42 private: |
| 41 virtual ~ThumbnailSource(); | 43 virtual ~ThumbnailSource(); |
| 42 | 44 |
| 43 // Raw PNG representation of the thumbnail to show when the thumbnail | 45 // Raw PNG representation of the thumbnail to show when the thumbnail |
| 44 // database doesn't have a thumbnail for a webpage. | 46 // database doesn't have a thumbnail for a webpage. |
| 45 scoped_refptr<base::RefCountedMemory> default_thumbnail_; | 47 scoped_refptr<base::RefCountedMemory> default_thumbnail_; |
| 46 | 48 |
| 47 // ThumbnailService. | 49 // ThumbnailService. |
| 48 scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_; | 50 scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_; |
| 49 | 51 |
| 50 DISALLOW_COPY_AND_ASSIGN(ThumbnailSource); | 52 DISALLOW_COPY_AND_ASSIGN(ThumbnailSource); |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 #endif // CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_ | 55 #endif // CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_ |
| OLD | NEW |