OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TESTING_AUTOMATION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // This is an automation provider containing testing calls. | 56 // This is an automation provider containing testing calls. |
57 class TestingAutomationProvider : public AutomationProvider, | 57 class TestingAutomationProvider : public AutomationProvider, |
58 public BrowserList::Observer, | 58 public BrowserList::Observer, |
59 public importer::ImporterListObserver, | 59 public importer::ImporterListObserver, |
60 public content::NotificationObserver { | 60 public content::NotificationObserver { |
61 public: | 61 public: |
62 explicit TestingAutomationProvider(Profile* profile); | 62 explicit TestingAutomationProvider(Profile* profile); |
63 | 63 |
64 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); | 64 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); |
65 | 65 |
66 // IPC::Channel::Listener: | 66 // IPC::Listener: |
67 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 67 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
68 virtual void OnChannelError() OVERRIDE; | 68 virtual void OnChannelError() OVERRIDE; |
69 | 69 |
70 private: | 70 private: |
71 // Storage for ImportSettings() to resume operations after a callback. | 71 // Storage for ImportSettings() to resume operations after a callback. |
72 struct ImportSettingsData { | 72 struct ImportSettingsData { |
73 string16 browser_name; | 73 string16 browser_name; |
74 int import_items; | 74 int import_items; |
75 bool first_run; | 75 bool first_run; |
76 Browser* browser; | 76 Browser* browser; |
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 ImportSettingsData import_settings_data_; | 1563 ImportSettingsData import_settings_data_; |
1564 | 1564 |
1565 // The automation event observer queue. It is lazily created when an observer | 1565 // The automation event observer queue. It is lazily created when an observer |
1566 // is added to avoid overhead when not needed. | 1566 // is added to avoid overhead when not needed. |
1567 scoped_ptr<AutomationEventQueue> automation_event_queue_; | 1567 scoped_ptr<AutomationEventQueue> automation_event_queue_; |
1568 | 1568 |
1569 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1569 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
1570 }; | 1570 }; |
1571 | 1571 |
1572 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1572 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
OLD | NEW |