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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // Returns true if the location bar should be focused by default rather than | 386 // Returns true if the location bar should be focused by default rather than |
387 // the page contents. The view calls this function when the tab is focused | 387 // the page contents. The view calls this function when the tab is focused |
388 // to see what it should do. | 388 // to see what it should do. |
389 virtual bool FocusLocationBarByDefault() = 0; | 389 virtual bool FocusLocationBarByDefault() = 0; |
390 | 390 |
391 // Focuses the location bar. | 391 // Focuses the location bar. |
392 virtual void SetFocusToLocationBar(bool select_all) = 0; | 392 virtual void SetFocusToLocationBar(bool select_all) = 0; |
393 | 393 |
394 // Does this have an opener associated with it? | 394 // Does this have an opener associated with it? |
395 virtual bool HasOpener() const = 0; | 395 virtual bool HasOpener() const = 0; |
| 396 |
| 397 typedef base::Callback<void(int, /* id */ |
| 398 const GURL&, /* image_url */ |
| 399 bool, /* errored */ |
| 400 int, /* requested_size */ |
| 401 const std::vector<SkBitmap>& /* bitmaps*/)> |
| 402 FaviconDownloadCallback; |
| 403 |
| 404 // Sends a request to download the given favicon |url| and returns the unique |
| 405 // id of the download request. When the download is finished, |callback| will |
| 406 // be called with the bitmaps received from the renderer. Note that |
| 407 // |image_size| is a hint for images with multiple sizes. The downloaded image |
| 408 // is not resized to the given image_size. If 0 is passed, the first frame of |
| 409 // the image is returned. |
| 410 virtual int DownloadFavicon(const GURL& url, int image_size, |
| 411 const FaviconDownloadCallback& callback) = 0; |
| 412 |
396 }; | 413 }; |
397 | 414 |
398 } // namespace content | 415 } // namespace content |
399 | 416 |
400 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 417 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |