| 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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 // to see what it should do. | 411 // to see what it should do. |
| 412 virtual bool FocusLocationBarByDefault() = 0; | 412 virtual bool FocusLocationBarByDefault() = 0; |
| 413 | 413 |
| 414 // Does this have an opener associated with it? | 414 // Does this have an opener associated with it? |
| 415 virtual bool HasOpener() const = 0; | 415 virtual bool HasOpener() const = 0; |
| 416 | 416 |
| 417 typedef base::Callback<void(int, /* id */ | 417 typedef base::Callback<void(int, /* id */ |
| 418 const GURL&, /* image_url */ | 418 const GURL&, /* image_url */ |
| 419 int, /* requested_size */ | 419 int, /* requested_size */ |
| 420 const std::vector<SkBitmap>& /* bitmaps*/)> | 420 const std::vector<SkBitmap>& /* bitmaps*/)> |
| 421 FaviconDownloadCallback; | 421 ImageDownloadCallback; |
| 422 | 422 |
| 423 // Sends a request to download the given favicon |url| and returns the unique | 423 // Sends a request to download the given image |url| and returns the unique |
| 424 // id of the download request. When the download is finished, |callback| will | 424 // id of the download request. When the download is finished, |callback| will |
| 425 // be called with the bitmaps received from the renderer. Note that | 425 // be called with the bitmaps received from the renderer. Note that |
| 426 // |image_size| is a hint for images with multiple sizes. The downloaded image | 426 // |image_size| is a hint for images with multiple sizes. The downloaded image |
| 427 // is not resized to the given image_size. If 0 is passed, the first frame of | 427 // is not resized to the given image_size. If 0 is passed, the first frame of |
| 428 // the image is returned. | 428 // the image is returned. |
| 429 virtual int DownloadFavicon(const GURL& url, int image_size, | 429 virtual int DownloadImage(const GURL& url, int image_size, |
| 430 const FaviconDownloadCallback& callback) = 0; | 430 const ImageDownloadCallback& callback) = 0; |
| 431 | 431 |
| 432 private: | 432 private: |
| 433 // This interface should only be implemented inside content. | 433 // This interface should only be implemented inside content. |
| 434 friend class WebContentsImpl; | 434 friend class WebContentsImpl; |
| 435 WebContents() {} | 435 WebContents() {} |
| 436 }; | 436 }; |
| 437 | 437 |
| 438 } // namespace content | 438 } // namespace content |
| 439 | 439 |
| 440 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 440 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |