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

Unified Diff: chrome/browser/extensions/execute_code_in_tab_function.h

Issue 6794035: Move dispatching and sending of the last extension specific messages out of TabContents and Rende... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/extensions/execute_code_in_tab_function.h
===================================================================
--- chrome/browser/extensions/execute_code_in_tab_function.h (revision 80315)
+++ chrome/browser/extensions/execute_code_in_tab_function.h (working copy)
@@ -10,12 +10,11 @@
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/common/extensions/extension_resource.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/browser/tab_contents/tab_contents_observer.h"
// Implement API call tabs.executeScript and tabs.insertCSS.
class ExecuteCodeInTabFunction : public AsyncExtensionFunction,
- public NotificationObserver {
+ public TabContentsObserver {
public:
ExecuteCodeInTabFunction();
virtual ~ExecuteCodeInTabFunction();
@@ -23,10 +22,12 @@
private:
virtual bool RunImpl();
- virtual void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ // TabContentsObserver overrides.
+ virtual bool OnMessageReceived(const IPC::Message& message);
+ // Message handler.
+ void OnExecuteCodeFinished(int request_id, bool success);
+
// Called when contents from the file whose path is specified in JSON
// arguments has been loaded.
void DidLoadFile(bool success, const std::string& data);
@@ -35,7 +36,7 @@
// true on success. If true is returned, this does an AddRef.
bool Execute(const std::string& code_string);
- NotificationRegistrar registrar_;
+ TabContentsObserver::Registrar registrar_;
// Id of tab which executes code.
int execute_tab_id_;

Powered by Google App Engine
This is Rietveld 408576698