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

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

Issue 6246007: Generate thumbnails in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 class PepperDeviceTest; 75 class PepperDeviceTest;
76 class PrintWebViewHelper; 76 class PrintWebViewHelper;
77 class RenderViewObserver; 77 class RenderViewObserver;
78 class RenderViewVisitor; 78 class RenderViewVisitor;
79 class SkBitmap; 79 class SkBitmap;
80 class SpeechInputDispatcher; 80 class SpeechInputDispatcher;
81 class WebPluginDelegatePepper; 81 class WebPluginDelegatePepper;
82 class WebPluginDelegateProxy; 82 class WebPluginDelegateProxy;
83 struct ContextMenuMediaParams; 83 struct ContextMenuMediaParams;
84 struct PP_Flash_NetAddress; 84 struct PP_Flash_NetAddress;
85 struct ThumbnailScore;
86 struct ViewMsg_ClosePage_Params; 85 struct ViewMsg_ClosePage_Params;
87 struct ViewMsg_Navigate_Params; 86 struct ViewMsg_Navigate_Params;
88 struct WebDropData; 87 struct WebDropData;
89 88
90 namespace base { 89 namespace base {
91 class WaitableEvent; 90 class WaitableEvent;
92 } 91 }
93 92
94 namespace gfx { 93 namespace gfx {
95 class Point; 94 class Point;
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 // page if it has been specified in meta tag. 742 // page if it has been specified in meta tag.
744 // c) function:DidFinishDocumentLoadForFrame. When this function is 743 // c) function:DidFinishDocumentLoadForFrame. When this function is
745 // called, that means we have got whole html page. In here we should 744 // called, that means we have got whole html page. In here we should
746 // finally get right encoding of page. 745 // finally get right encoding of page.
747 void UpdateEncoding(WebKit::WebFrame* frame, 746 void UpdateEncoding(WebKit::WebFrame* frame,
748 const std::string& encoding_name); 747 const std::string& encoding_name);
749 748
750 void OpenURL(const GURL& url, const GURL& referrer, 749 void OpenURL(const GURL& url, const GURL& referrer,
751 WebKit::WebNavigationPolicy policy); 750 WebKit::WebNavigationPolicy policy);
752 751
753 // Captures the thumbnail and text contents for indexing for the given load 752 // Captures the text contents for indexing for the given load
754 // ID. If the view's load ID is different than the parameter, this call is 753 // ID. If the view's load ID is different than the parameter, this call is
755 // a NOP. Typically called on a timer, so the load ID may have changed in the 754 // a NOP. Typically called on a timer, so the load ID may have changed in the
756 // meantime. 755 // meantime.
757 void CapturePageInfo(int load_id, bool preliminary_capture); 756 void CapturePageInfo(int load_id, bool preliminary_capture);
758 757
759 // Retrieves the text from the given frame contents, the page text up to the 758 // Retrieves the text from the given frame contents, the page text up to the
760 // maximum amount kMaxIndexChars will be placed into the given buffer. 759 // maximum amount kMaxIndexChars will be placed into the given buffer.
761 void CaptureText(WebKit::WebFrame* frame, string16* contents); 760 void CaptureText(WebKit::WebFrame* frame, string16* contents);
762 761
763 // Creates a thumbnail of |frame|'s contents resized to (|w|, |h|)
764 // and puts that in |thumbnail|. Thumbnail metadata goes in |score|.
765 bool CaptureThumbnail(WebKit::WebView* view, int w, int h,
766 SkBitmap* thumbnail,
767 ThumbnailScore* score);
768
769 // Capture a snapshot of a view. This is used to allow an extension 762 // Capture a snapshot of a view. This is used to allow an extension
770 // to get a snapshot of a tab using chrome.tabs.captureVisibleTab(). 763 // to get a snapshot of a tab using chrome.tabs.captureVisibleTab().
771 bool CaptureSnapshot(WebKit::WebView* view, SkBitmap* snapshot); 764 bool CaptureSnapshot(WebKit::WebView* view, SkBitmap* snapshot);
772 765
773 bool RunJavaScriptMessage(int type, 766 bool RunJavaScriptMessage(int type,
774 const std::wstring& message, 767 const std::wstring& message,
775 const std::wstring& default_value, 768 const std::wstring& default_value,
776 const GURL& frame_url, 769 const GURL& frame_url,
777 std::wstring* result); 770 std::wstring* result);
778 771
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 const PP_Flash_NetAddress& local_addr, 805 const PP_Flash_NetAddress& local_addr,
813 const PP_Flash_NetAddress& remote_addr); 806 const PP_Flash_NetAddress& remote_addr);
814 #endif 807 #endif
815 void OnContextMenuClosed(); 808 void OnContextMenuClosed();
816 void OnCopy(); 809 void OnCopy();
817 void OnCopyImageAt(int x, int y); 810 void OnCopyImageAt(int x, int y);
818 #if defined(OS_MACOSX) 811 #if defined(OS_MACOSX)
819 void OnCopyToFindPboard(); 812 void OnCopyToFindPboard();
820 #endif 813 #endif
821 void OnCut(); 814 void OnCut();
822 void OnCaptureThumbnail();
823 void OnCaptureSnapshot(); 815 void OnCaptureSnapshot();
824 void OnCSSInsertRequest(const std::wstring& frame_xpath, 816 void OnCSSInsertRequest(const std::wstring& frame_xpath,
825 const std::string& css, 817 const std::string& css,
826 const std::string& id); 818 const std::string& id);
827 void OnCustomContextMenuAction(unsigned action); 819 void OnCustomContextMenuAction(unsigned action);
828 void OnDelete(); 820 void OnDelete();
829 void OnDeterminePageLanguage(); 821 void OnDeterminePageLanguage();
830 void OnDisableScrollbarsForSmallWindows( 822 void OnDisableScrollbarsForSmallWindows(
831 const gfx::Size& disable_scrollbars_size_limit); 823 const gfx::Size& disable_scrollbars_size_limit);
832 void OnDisassociateFromPopupCount(); 824 void OnDisassociateFromPopupCount();
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 // bunch of stuff, you should probably create a helper class and put your 1456 // bunch of stuff, you should probably create a helper class and put your
1465 // data and methods on that to avoid bloating RenderView more. You can use 1457 // data and methods on that to avoid bloating RenderView more. You can use
1466 // the Observer interface to filter IPC messages and receive frame change 1458 // the Observer interface to filter IPC messages and receive frame change
1467 // notifications. 1459 // notifications.
1468 // --------------------------------------------------------------------------- 1460 // ---------------------------------------------------------------------------
1469 1461
1470 DISALLOW_COPY_AND_ASSIGN(RenderView); 1462 DISALLOW_COPY_AND_ASSIGN(RenderView);
1471 }; 1463 };
1472 1464
1473 #endif // CHROME_RENDERER_RENDER_VIEW_H_ 1465 #endif // CHROME_RENDERER_RENDER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698