Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: chrome/renderer/render_view.h

Issue 2714012: Convert page contents grabbing from wide to UTF16. The current code is a bit... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 631
632 void OpenURL(const GURL& url, const GURL& referrer, 632 void OpenURL(const GURL& url, const GURL& referrer,
633 WebKit::WebNavigationPolicy policy); 633 WebKit::WebNavigationPolicy policy);
634 634
635 // Captures the thumbnail and text contents for indexing for the given load 635 // Captures the thumbnail and text contents for indexing for the given load
636 // ID. If the view's load ID is different than the parameter, this call is 636 // ID. If the view's load ID is different than the parameter, this call is
637 // a NOP. Typically called on a timer, so the load ID may have changed in the 637 // a NOP. Typically called on a timer, so the load ID may have changed in the
638 // meantime. 638 // meantime.
639 void CapturePageInfo(int load_id, bool preliminary_capture); 639 void CapturePageInfo(int load_id, bool preliminary_capture);
640 640
641 // Called to retrieve the text from the given frame contents, the page text 641 // Retrieves the text from the given frame contents, the page text up to the
642 // up to the maximum amount will be placed into the given buffer 642 // maximum amount kMaxIndexChars will be placed into the given buffer
Nico 2010/06/10 21:03:35 .
643 void CaptureText(WebKit::WebFrame* frame, std::wstring* contents); 643 void CaptureText(WebKit::WebFrame* frame, string16* contents);
644 644
645 // Creates a thumbnail of |frame|'s contents resized to (|w|, |h|) 645 // Creates a thumbnail of |frame|'s contents resized to (|w|, |h|)
646 // and puts that in |thumbnail|. Thumbnail metadata goes in |score|. 646 // and puts that in |thumbnail|. Thumbnail metadata goes in |score|.
647 bool CaptureThumbnail(WebKit::WebView* view, int w, int h, 647 bool CaptureThumbnail(WebKit::WebView* view, int w, int h,
648 SkBitmap* thumbnail, 648 SkBitmap* thumbnail,
649 ThumbnailScore* score); 649 ThumbnailScore* score);
650 650
651 // Capture a snapshot of a view. This is used to allow an extension 651 // Capture a snapshot of a view. This is used to allow an extension
652 // to get a snapshot of a tab using chrome.tabs.captureVisibleTab(). 652 // to get a snapshot of a tab using chrome.tabs.captureVisibleTab().
653 bool CaptureSnapshot(WebKit::WebView* view, SkBitmap* snapshot); 653 bool CaptureSnapshot(WebKit::WebView* view, SkBitmap* snapshot);
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 1259 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
1260 // sections rather than throwing it randomly at the end. If you're adding a 1260 // sections rather than throwing it randomly at the end. If you're adding a
1261 // bunch of stuff, you should probably create a helper class and put your 1261 // bunch of stuff, you should probably create a helper class and put your
1262 // data and methods on that to avoid bloating RenderView more. 1262 // data and methods on that to avoid bloating RenderView more.
1263 // --------------------------------------------------------------------------- 1263 // ---------------------------------------------------------------------------
1264 1264
1265 DISALLOW_COPY_AND_ASSIGN(RenderView); 1265 DISALLOW_COPY_AND_ASSIGN(RenderView);
1266 }; 1266 };
1267 1267
1268 #endif // CHROME_RENDERER_RENDER_VIEW_H_ 1268 #endif // CHROME_RENDERER_RENDER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698