summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 22:40:34 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 22:40:34 +0000
commite5518c760e5a8b4269eeab6849d670b0138c9462 (patch)
treeaf4a4bded911ffe719fbd0739780992399a3d0a8 /chrome/common
parent279e814726e6a3657c3b9e6ce458e13fd895df96 (diff)
downloadchromium_src-e5518c760e5a8b4269eeab6849d670b0138c9462.zip
chromium_src-e5518c760e5a8b4269eeab6849d670b0138c9462.tar.gz
chromium_src-e5518c760e5a8b4269eeab6849d670b0138c9462.tar.bz2
If a backing store is not available, chrome.tabs.captureVisibleTab() asks the renderer for a snapshot of the page.
BUG=19274 TEST=Manual testing on Mac,Linux,Win Review URL: http://codereview.chromium.org/502034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/notification_type.h3
-rw-r--r--chrome/common/render_messages_internal.h8
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h
index 97a28f3..d88b97e 100644
--- a/chrome/common/notification_type.h
+++ b/chrome/common/notification_type.h
@@ -227,6 +227,9 @@ class NotificationType {
// are Details<std::string> and the source is Source<RenderViewHost>.
TAB_LANGUAGE_DETERMINED,
+ // Sent after the renderer returns a snapshot of tab contents.
+ TAB_SNAPSHOT_TAKEN,
+
// Send after the code is run in specified tab.
TAB_CODE_EXECUTED,
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 453cdf3..b4e1e92 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -128,6 +128,10 @@ IPC_BEGIN_MESSAGES(View)
// render view responds with a ViewHostMsg_Thumbnail.
IPC_MESSAGE_ROUTED0(ViewMsg_CaptureThumbnail)
+ // Tells the render view to capture a thumbnail image of the page. The
+ // render view responds with a ViewHostMsg_Snapshot.
+ IPC_MESSAGE_ROUTED0(ViewMsg_CaptureSnapshot)
+
// Tells the render view to switch the CSS to print media type, renders every
// requested pages and switch back the CSS to display media type.
IPC_MESSAGE_ROUTED0(ViewMsg_PrintPages)
@@ -1139,6 +1143,10 @@ IPC_BEGIN_MESSAGES(ViewHost)
ThumbnailScore /* score */,
SkBitmap /* bitmap */)
+ // Send a snapshot of the tab contents to the render host.
+ IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot,
+ SkBitmap /* bitmap */)
+
// Notification that the url for the favicon of a site has been determined.
IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFavIconURL,
int32 /* page_id */,