| OLD | NEW | 
|     1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |     1 // Copyright (c) 2011 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 #include <string> |    12 #include <string> | 
|    13 #include <vector> |    13 #include <vector> | 
|    14  |    14  | 
|    15 #include "base/compiler_specific.h" |    15 #include "base/compiler_specific.h" | 
|    16 #include "base/memory/scoped_ptr.h" |    16 #include "base/memory/scoped_ptr.h" | 
|    17 #include "base/memory/weak_ptr.h" |    17 #include "base/memory/weak_ptr.h" | 
|    18 #include "chrome/browser/automation/automation_provider_json.h" |    18 #include "chrome/browser/automation/automation_provider_json.h" | 
|    19 #include "chrome/browser/bookmarks/bookmark_model_observer.h" |    19 #include "chrome/browser/bookmarks/bookmark_model_observer.h" | 
|    20 #include "chrome/browser/browsing_data_remover.h" |    20 #include "chrome/browser/browsing_data_remover.h" | 
|    21 #if defined(OS_CHROMEOS) |    21 #if defined(OS_CHROMEOS) | 
|    22 #include "chrome/browser/chromeos/cros/network_library.h" |    22 #include "chrome/browser/chromeos/cros/network_library.h" | 
|    23 #endif  // defined(OS_CHROMEOS) |    23 #endif  // defined(OS_CHROMEOS) | 
|    24 #include "chrome/browser/download/download_item.h" |    24 #include "chrome/browser/download/download_item.h" | 
|    25 #include "chrome/browser/download/download_manager.h" |    25 #include "chrome/browser/download/download_manager.h" | 
|    26 #include "chrome/browser/history/history.h" |    26 #include "chrome/browser/history/history.h" | 
|    27 #include "chrome/browser/history/history_types.h" |    27 #include "chrome/browser/history/history_types.h" | 
|    28 #include "chrome/browser/importer/importer_data_types.h" |    28 #include "chrome/browser/importer/importer_data_types.h" | 
|    29 #include "chrome/browser/importer/importer_progress_observer.h" |    29 #include "chrome/browser/importer/importer_progress_observer.h" | 
|    30 #include "chrome/browser/password_manager/password_store.h" |    30 #include "chrome/browser/password_manager/password_store_consumer.h" | 
|    31 #include "chrome/browser/search_engines/template_url_model_observer.h" |    31 #include "chrome/browser/search_engines/template_url_model_observer.h" | 
|    32 #include "chrome/browser/tabs/tab_strip_model.h" |    32 #include "chrome/browser/tabs/tab_strip_model.h" | 
|    33 #include "chrome/common/automation_constants.h" |    33 #include "chrome/common/automation_constants.h" | 
|    34 #include "content/browser/cancelable_request.h" |    34 #include "content/browser/cancelable_request.h" | 
|    35 #include "content/common/notification_observer.h" |    35 #include "content/common/notification_observer.h" | 
|    36 #include "content/common/notification_registrar.h" |    36 #include "content/common/notification_registrar.h" | 
|    37 #include "content/common/notification_type.h" |    37 #include "content/common/notification_type.h" | 
|    38 #include "ui/gfx/size.h" |    38 #include "ui/gfx/size.h" | 
|    39  |    39  | 
|    40 class AutocompleteEditModel; |    40 class AutocompleteEditModel; | 
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   901   virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; |   901   virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; | 
|   902   virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; |   902   virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; | 
|   903   virtual void ImportEnded() OVERRIDE; |   903   virtual void ImportEnded() OVERRIDE; | 
|   904  |   904  | 
|   905  private: |   905  private: | 
|   906   base::WeakPtr<AutomationProvider> provider_; |   906   base::WeakPtr<AutomationProvider> provider_; | 
|   907   scoped_ptr<IPC::Message> reply_message_; |   907   scoped_ptr<IPC::Message> reply_message_; | 
|   908 }; |   908 }; | 
|   909  |   909  | 
|   910 // Allows automation provider to wait for getting passwords to finish. |   910 // Allows automation provider to wait for getting passwords to finish. | 
|   911 class AutomationProviderGetPasswordsObserver |   911 class AutomationProviderGetPasswordsObserver : public PasswordStoreConsumer { | 
|   912     : public PasswordStoreConsumer { |  | 
|   913  public: |   912  public: | 
|   914   AutomationProviderGetPasswordsObserver( |   913   AutomationProviderGetPasswordsObserver( | 
|   915       AutomationProvider* provider, |   914       AutomationProvider* provider, | 
|   916       IPC::Message* reply_message); |   915       IPC::Message* reply_message); | 
|   917   virtual ~AutomationProviderGetPasswordsObserver(); |   916   virtual ~AutomationProviderGetPasswordsObserver(); | 
|   918  |   917  | 
|   919   virtual void OnPasswordStoreRequestDone( |   918   virtual void OnPasswordStoreRequestDone( | 
|   920       int handle, const std::vector<webkit_glue::PasswordForm*>& result); |   919       CancelableRequestProvider::Handle handle, | 
 |   920       const std::vector<webkit_glue::PasswordForm*>& result); | 
|   921  |   921  | 
|   922  private: |   922  private: | 
|   923   base::WeakPtr<AutomationProvider> provider_; |   923   base::WeakPtr<AutomationProvider> provider_; | 
|   924   scoped_ptr<IPC::Message> reply_message_; |   924   scoped_ptr<IPC::Message> reply_message_; | 
|   925 }; |   925 }; | 
|   926  |   926  | 
|   927 // Allows the automation provider to wait for clearing browser data to finish. |   927 // Allows the automation provider to wait for clearing browser data to finish. | 
|   928 class AutomationProviderBrowsingDataObserver |   928 class AutomationProviderBrowsingDataObserver | 
|   929     : public BrowsingDataRemover::Observer { |   929     : public BrowsingDataRemover::Observer { | 
|   930  public: |   930  public: | 
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1218   // Sends the |reply_message_| to |automation_| indicating we're done. |  1218   // Sends the |reply_message_| to |automation_| indicating we're done. | 
|  1219   void RunOnUIThread(); |  1219   void RunOnUIThread(); | 
|  1220  |  1220  | 
|  1221   base::WeakPtr<AutomationProvider> automation_; |  1221   base::WeakPtr<AutomationProvider> automation_; | 
|  1222   scoped_ptr<IPC::Message> reply_message_; |  1222   scoped_ptr<IPC::Message> reply_message_; | 
|  1223  |  1223  | 
|  1224   DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver); |  1224   DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver); | 
|  1225 }; |  1225 }; | 
|  1226  |  1226  | 
|  1227 #endif  // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |  1227 #endif  // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 
| OLD | NEW |