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

Unified Diff: chrome/browser/automation/automation_tab_helper.cc

Issue 8416024: Re-land 107645 with static initializers removed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove static initializers Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/automation_tab_helper.cc
diff --git a/chrome/browser/automation/automation_tab_helper.cc b/chrome/browser/automation/automation_tab_helper.cc
index c9658a4ebcfb9f99163bc580cf2c959e67297281..3e4945a0f151ea2a0cc4746484895da7d380ae73 100644
--- a/chrome/browser/automation/automation_tab_helper.cc
+++ b/chrome/browser/automation/automation_tab_helper.cc
@@ -12,6 +12,8 @@
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
+#include "ui/gfx/size.h"
+
TabEventObserver::TabEventObserver() { }
TabEventObserver::~TabEventObserver() {
@@ -49,6 +51,10 @@ void AutomationTabHelper::RemoveObserver(TabEventObserver* observer) {
observers_.RemoveObserver(observer);
}
+void AutomationTabHelper::SnapshotEntirePage() {
+ Send(new AutomationMsg_SnapshotEntirePage(routing_id()));
+}
+
bool AutomationTabHelper::has_pending_loads() const {
return is_loading_ || !pending_client_redirects_.empty();
}
@@ -99,10 +105,20 @@ void AutomationTabHelper::OnTabOrRenderViewDestroyed(
}
}
+void AutomationTabHelper::OnSnapshotEntirePageACK(
+ bool success,
+ const std::vector<unsigned char>& png_data,
+ const std::string& error_msg) {
+ FOR_EACH_OBSERVER(TabEventObserver, observers_,
+ OnSnapshotEntirePageACK(success, png_data, error_msg));
+}
+
bool AutomationTabHelper::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
bool msg_is_good = true;
IPC_BEGIN_MESSAGE_MAP_EX(AutomationTabHelper, message, msg_is_good)
+ IPC_MESSAGE_HANDLER(AutomationMsg_SnapshotEntirePageACK,
+ OnSnapshotEntirePageACK)
IPC_MESSAGE_HANDLER(AutomationMsg_WillPerformClientRedirect,
OnWillPerformClientRedirect)
IPC_MESSAGE_HANDLER(AutomationMsg_DidCompleteOrCancelClientRedirect,
« no previous file with comments | « chrome/browser/automation/automation_tab_helper.h ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698