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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.h

Issue 5088001: Add pyauto hook for getting and manipulating the data underneath the NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/functional
Patch Set: Clean up Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 12
13 #include "base/scoped_ptr.h"
13 #include "chrome/browser/automation/automation_provider_json.h" 14 #include "chrome/browser/automation/automation_provider_json.h"
14 #include "chrome/browser/bookmarks/bookmark_model_observer.h" 15 #include "chrome/browser/bookmarks/bookmark_model_observer.h"
15 #include "chrome/browser/browsing_data_remover.h" 16 #include "chrome/browser/browsing_data_remover.h"
17 #include "chrome/browser/cancelable_request.h"
16 #include "chrome/browser/download/download_item.h" 18 #include "chrome/browser/download/download_item.h"
17 #include "chrome/browser/download/download_manager.h" 19 #include "chrome/browser/download/download_manager.h"
18 #include "chrome/browser/history/history.h" 20 #include "chrome/browser/history/history.h"
21 #include "chrome/browser/history/history_types.h"
19 #include "chrome/browser/importer/importer.h" 22 #include "chrome/browser/importer/importer.h"
20 #include "chrome/browser/importer/importer_data_types.h" 23 #include "chrome/browser/importer/importer_data_types.h"
21 #include "chrome/browser/password_manager/password_store.h" 24 #include "chrome/browser/password_manager/password_store.h"
22 #include "chrome/browser/search_engines/template_url_model_observer.h" 25 #include "chrome/browser/search_engines/template_url_model_observer.h"
23 #include "chrome/browser/tabs/tab_strip_model.h" 26 #include "chrome/browser/tabs/tab_strip_model.h"
24 #include "chrome/common/automation_messages.h" 27 #include "chrome/common/automation_messages.h"
25 #include "chrome/common/notification_observer.h" 28 #include "chrome/common/notification_observer.h"
26 #include "chrome/common/notification_registrar.h" 29 #include "chrome/common/notification_registrar.h"
27 #include "chrome/common/notification_type.h" 30 #include "chrome/common/notification_type.h"
28 31
29 class AutocompleteEditModel; 32 class AutocompleteEditModel;
30 class AutomationProvider; 33 class AutomationProvider;
31 class BalloonCollection; 34 class BalloonCollection;
32 class Browser; 35 class Browser;
33 class Extension; 36 class Extension;
34 class ExtensionProcessManager; 37 class ExtensionProcessManager;
35 class NavigationController; 38 class NavigationController;
36 class RenderViewHost; 39 class RenderViewHost;
37 class SavePackage; 40 class SavePackage;
38 class TabContents; 41 class TabContents;
39 class TranslateInfoBarDelegate; 42 class TranslateInfoBarDelegate;
40 43
44 namespace history {
45 class TopSites;
46 }
47
41 namespace IPC { 48 namespace IPC {
42 class Message; 49 class Message;
43 } 50 }
44 51
45 class InitialLoadObserver : public NotificationObserver { 52 class InitialLoadObserver : public NotificationObserver {
46 public: 53 public:
47 InitialLoadObserver(size_t tab_count, AutomationProvider* automation); 54 InitialLoadObserver(size_t tab_count, AutomationProvider* automation);
48 ~InitialLoadObserver(); 55 ~InitialLoadObserver();
49 56
50 virtual void Observe(NotificationType type, 57 virtual void Observe(NotificationType type,
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 919
913 AutomationProvider* automation_; 920 AutomationProvider* automation_;
914 IPC::Message* reply_message_; 921 IPC::Message* reply_message_;
915 RenderViewHost* render_view_; 922 RenderViewHost* render_view_;
916 FilePath image_path_; 923 FilePath image_path_;
917 bool received_width_; 924 bool received_width_;
918 gfx::Size entire_page_size_; 925 gfx::Size entire_page_size_;
919 926
920 DISALLOW_COPY_AND_ASSIGN(PageSnapshotTaker); 927 DISALLOW_COPY_AND_ASSIGN(PageSnapshotTaker);
921 }; 928 };
922 929
Nirnimesh 2010/11/16 22:25:05 Please add a comment stating the purpose
930 class NTPInfoObserver {
931 public:
932 NTPInfoObserver(AutomationProvider* automation,
933 IPC::Message* reply_message,
934 CancelableRequestConsumer* consumer);
935
936 private:
937 void OnTopSitesRefreshed();
938 void OnTopSitesReceived(const history::MostVisitedURLList& visited_list);
939
940 AutomationProvider* automation_;
941 IPC::Message* reply_message_;
942 CancelableRequestConsumer* consumer_;
943 scoped_ptr<DictionaryValue> ntp_info_;
944 history::TopSites* top_sites_;
945
946 DISALLOW_COPY_AND_ASSIGN(NTPInfoObserver);
947 };
948
923 // Allows automation provider to wait until the autocomplete edit 949 // Allows automation provider to wait until the autocomplete edit
924 // has received focus 950 // has received focus
925 class AutocompleteEditFocusedObserver : public NotificationObserver { 951 class AutocompleteEditFocusedObserver : public NotificationObserver {
926 public: 952 public:
927 AutocompleteEditFocusedObserver(AutomationProvider* automation, 953 AutocompleteEditFocusedObserver(AutomationProvider* automation,
928 AutocompleteEditModel* autocomplete_edit, 954 AutocompleteEditModel* autocomplete_edit,
929 IPC::Message* reply_message); 955 IPC::Message* reply_message);
930 956
931 virtual void Observe(NotificationType type, 957 virtual void Observe(NotificationType type,
932 const NotificationSource& source, 958 const NotificationSource& source,
(...skipping 22 matching lines...) Expand all
955 private: 981 private:
956 AutomationJSONReply reply_; 982 AutomationJSONReply reply_;
957 BalloonCollection* collection_; 983 BalloonCollection* collection_;
958 int count_; 984 int count_;
959 985
960 DISALLOW_COPY_AND_ASSIGN(OnNotificationBalloonCountObserver); 986 DISALLOW_COPY_AND_ASSIGN(OnNotificationBalloonCountObserver);
961 }; 987 };
962 988
963 989
964 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 990 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698