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

Unified Diff: chrome/browser/automation/automation_provider_observers.h

Issue 3026016: New pyauto hook for the translate feature. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Small changes Created 10 years, 5 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_provider_observers.h
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h
index 732d1fd9cda0a2d101259964667f2cf4558db754..77e0f891cda9e49560aca59ab590a0fc43ad0bd7 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -29,6 +29,7 @@ class ExtensionProcessManager;
class NavigationController;
class SavePackage;
class TabContents;
+class TranslateInfoBarDelegate;
namespace IPC {
class Message;
@@ -486,6 +487,47 @@ class MetricEventDurationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(MetricEventDurationObserver);
};
+class PageTranslatedObserver : public NotificationObserver {
+ public:
+ PageTranslatedObserver(AutomationProvider* automation,
+ IPC::Message* reply_message,
+ TabContents* tab_contents);
+
+ // NotificationObserver interface.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
+ private:
+ NotificationRegistrar registrar_;
+ scoped_refptr<AutomationProvider> automation_;
+ IPC::Message* reply_message_;
+
+ DISALLOW_COPY_AND_ASSIGN(PageTranslatedObserver);
+};
+
+class TabLanguageDeterminedObserver : public NotificationObserver {
+ public:
+ TabLanguageDeterminedObserver(AutomationProvider* automation,
+ IPC::Message* reply_message,
+ TabContents* tab_contents,
+ TranslateInfoBarDelegate* translate_bar);
+
+ // NotificationObserver interface.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
+ private:
+ NotificationRegistrar registrar_;
+ AutomationProvider* automation_;
+ IPC::Message* reply_message_;
+ TabContents* tab_contents_;
+ TranslateInfoBarDelegate* translate_bar_;
+
+ DISALLOW_COPY_AND_ASSIGN(TabLanguageDeterminedObserver);
+};
+
#if defined(OS_CHROMEOS)
// Collects LOGIN_AUTHENTICATION notifications and returns
// whether authentication succeeded to the automation provider.
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/automation/automation_provider_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698