| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ |
| 6 #define CHROME_RENDERER_RENDER_VIEW_H_ | 6 #define CHROME_RENDERER_RENDER_VIEW_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 | 647 |
| 648 void OpenURL(const GURL& url, const GURL& referrer, | 648 void OpenURL(const GURL& url, const GURL& referrer, |
| 649 WebKit::WebNavigationPolicy policy); | 649 WebKit::WebNavigationPolicy policy); |
| 650 | 650 |
| 651 // Captures the thumbnail and text contents for indexing for the given load | 651 // Captures the thumbnail and text contents for indexing for the given load |
| 652 // ID. If the view's load ID is different than the parameter, this call is | 652 // ID. If the view's load ID is different than the parameter, this call is |
| 653 // a NOP. Typically called on a timer, so the load ID may have changed in the | 653 // a NOP. Typically called on a timer, so the load ID may have changed in the |
| 654 // meantime. | 654 // meantime. |
| 655 void CapturePageInfo(int load_id, bool preliminary_capture); | 655 void CapturePageInfo(int load_id, bool preliminary_capture); |
| 656 | 656 |
| 657 // Retrieves the text from the given frame contents, the page text up to the | 657 // Called to retrieve the text from the given frame contents, the page text |
| 658 // maximum amount kMaxIndexChars will be placed into the given buffer. | 658 // up to the maximum amount will be placed into the given buffer |
| 659 void CaptureText(WebKit::WebFrame* frame, string16* contents); | 659 void CaptureText(WebKit::WebFrame* frame, std::wstring* contents); |
| 660 | 660 |
| 661 // Creates a thumbnail of |frame|'s contents resized to (|w|, |h|) | 661 // Creates a thumbnail of |frame|'s contents resized to (|w|, |h|) |
| 662 // and puts that in |thumbnail|. Thumbnail metadata goes in |score|. | 662 // and puts that in |thumbnail|. Thumbnail metadata goes in |score|. |
| 663 bool CaptureThumbnail(WebKit::WebView* view, int w, int h, | 663 bool CaptureThumbnail(WebKit::WebView* view, int w, int h, |
| 664 SkBitmap* thumbnail, | 664 SkBitmap* thumbnail, |
| 665 ThumbnailScore* score); | 665 ThumbnailScore* score); |
| 666 | 666 |
| 667 // Capture a snapshot of a view. This is used to allow an extension | 667 // Capture a snapshot of a view. This is used to allow an extension |
| 668 // to get a snapshot of a tab using chrome.tabs.captureVisibleTab(). | 668 // to get a snapshot of a tab using chrome.tabs.captureVisibleTab(). |
| 669 bool CaptureSnapshot(WebKit::WebView* view, SkBitmap* snapshot); | 669 bool CaptureSnapshot(WebKit::WebView* view, SkBitmap* snapshot); |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 // ADDING NEW DATA? Please see if it fits appropriately in one of the above | 1276 // ADDING NEW DATA? Please see if it fits appropriately in one of the above |
| 1277 // sections rather than throwing it randomly at the end. If you're adding a | 1277 // sections rather than throwing it randomly at the end. If you're adding a |
| 1278 // bunch of stuff, you should probably create a helper class and put your | 1278 // bunch of stuff, you should probably create a helper class and put your |
| 1279 // data and methods on that to avoid bloating RenderView more. | 1279 // data and methods on that to avoid bloating RenderView more. |
| 1280 // --------------------------------------------------------------------------- | 1280 // --------------------------------------------------------------------------- |
| 1281 | 1281 |
| 1282 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1282 DISALLOW_COPY_AND_ASSIGN(RenderView); |
| 1283 }; | 1283 }; |
| 1284 | 1284 |
| 1285 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 1285 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |