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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
405 // to see what it should do. | 405 // to see what it should do. |
406 virtual bool FocusLocationBarByDefault() = 0; | 406 virtual bool FocusLocationBarByDefault() = 0; |
407 | 407 |
408 // Does this have an opener associated with it? | 408 // Does this have an opener associated with it? |
409 virtual bool HasOpener() const = 0; | 409 virtual bool HasOpener() const = 0; |
410 | 410 |
411 typedef base::Callback<void(int, /* id */ | 411 typedef base::Callback<void(int, /* id */ |
412 const GURL&, /* image_url */ | 412 const GURL&, /* image_url */ |
413 int, /* requested_size */ | 413 int, /* requested_size */ |
414 const std::vector<SkBitmap>& /* bitmaps*/)> | 414 const std::vector<SkBitmap>& /* bitmaps*/)> |
415 FaviconDownloadCallback; | 415 ImageDownloadCallback; |
416 | 416 |
417 // Sends a request to download the given favicon |url| and returns the unique | 417 // Sends a request to download the given image |url| and returns the unique |
418 // id of the download request. When the download is finished, |callback| will | 418 // id of the download request. When the download is finished, |callback| will |
419 // be called with the bitmaps received from the renderer. If [is_favicon|, | 419 // be called with the bitmaps received from the renderer. If [is_favicon|, |
Cait (Slow)
2013/03/28 19:10:18
nit: [is_favicon| --> |is_favicon|
maybe also add
Dmitry Titov
2013/03/28 22:52:40
Done.
| |
420 // the cookeis are not sent and not accepted during download. Note that | 420 // the cookeis are not sent and not accepted during download. Note that |
Cait (Slow)
2013/03/28 19:10:18
nit: cookeis--> cookies
Dmitry Titov
2013/03/28 22:52:40
Done.
| |
421 // |image_size| is a hint for images with multiple sizes. The downloaded image | 421 // |image_size| is a hint for images with multiple sizes. The downloaded image |
422 // is not resized to the given image_size. If 0 is passed, the first frame of | 422 // is not resized to the given image_size. If 0 is passed, the first frame of |
423 // the image is returned. | 423 // the image is returned. |
424 virtual int DownloadFavicon(const GURL& url, | 424 virtual int DownloadImage(const GURL& url, |
425 bool is_favicon, | 425 bool is_favicon, |
426 int image_size, | 426 int image_size, |
427 const FaviconDownloadCallback& callback) = 0; | 427 const ImageDownloadCallback& callback) = 0; |
428 | 428 |
429 private: | 429 private: |
430 // This interface should only be implemented inside content. | 430 // This interface should only be implemented inside content. |
431 friend class WebContentsImpl; | 431 friend class WebContentsImpl; |
432 WebContents() {} | 432 WebContents() {} |
433 }; | 433 }; |
434 | 434 |
435 } // namespace content | 435 } // namespace content |
436 | 436 |
437 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 437 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |