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 // This implements a browser-side endpoint for UI automation activity. | 5 // This implements a browser-side endpoint for UI automation activity. |
6 // The client-side endpoint is implemented by AutomationProxy. | 6 // The client-side endpoint is implemented by AutomationProxy. |
7 // The entire lifetime of this object should be contained within that of | 7 // The entire lifetime of this object should be contained within that of |
8 // the BrowserProcess, and in particular the NotificationService that's | 8 // the BrowserProcess, and in particular the NotificationService that's |
9 // hung off of it. | 9 // hung off of it. |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "base/observer_list.h" | 25 #include "base/observer_list.h" |
26 #include "base/string16.h" | 26 #include "base/string16.h" |
27 #include "chrome/browser/autofill/field_types.h" | 27 #include "chrome/browser/autofill/field_types.h" |
28 #include "chrome/browser/cancelable_request.h" | 28 #include "chrome/browser/cancelable_request.h" |
29 #include "chrome/common/automation_constants.h" | 29 #include "chrome/common/automation_constants.h" |
30 #include "chrome/common/content_settings.h" | 30 #include "chrome/common/content_settings.h" |
31 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
32 #include "content/public/browser/notification_observer.h" | 32 #include "content/public/browser/notification_observer.h" |
33 #include "content/public/browser/trace_subscriber.h" | 33 #include "content/public/browser/trace_subscriber.h" |
34 #include "ipc/ipc_channel.h" | 34 #include "ipc/ipc_channel.h" |
| 35 #include "ipc/ipc_listener.h" |
| 36 #include "ipc/ipc_sender.h" |
35 | 37 |
36 #if defined(OS_WIN) && !defined(USE_AURA) | 38 #if defined(OS_WIN) && !defined(USE_AURA) |
37 #include "ui/gfx/native_widget_types.h" | 39 #include "ui/gfx/native_widget_types.h" |
38 #include "ui/views/events/event.h" | 40 #include "ui/views/events/event.h" |
39 #endif // defined(OS_WIN) && !defined(USE_AURA) | 41 #endif // defined(OS_WIN) && !defined(USE_AURA) |
40 | 42 |
41 class AutomationBrowserTracker; | 43 class AutomationBrowserTracker; |
42 class AutomationResourceMessageFilter; | 44 class AutomationResourceMessageFilter; |
43 class AutomationTabTracker; | 45 class AutomationTabTracker; |
44 class AutomationWindowTracker; | 46 class AutomationWindowTracker; |
(...skipping 27 matching lines...) Expand all Loading... |
72 namespace content { | 74 namespace content { |
73 class DownloadItem; | 75 class DownloadItem; |
74 class WebContents; | 76 class WebContents; |
75 } | 77 } |
76 | 78 |
77 namespace gfx { | 79 namespace gfx { |
78 class Point; | 80 class Point; |
79 } | 81 } |
80 | 82 |
81 class AutomationProvider | 83 class AutomationProvider |
82 : public IPC::Channel::Listener, | 84 : public IPC::Listener, |
83 public IPC::Message::Sender, | 85 public IPC::Sender, |
84 public base::SupportsWeakPtr<AutomationProvider>, | 86 public base::SupportsWeakPtr<AutomationProvider>, |
85 public base::RefCountedThreadSafe< | 87 public base::RefCountedThreadSafe< |
86 AutomationProvider, content::BrowserThread::DeleteOnUIThread>, | 88 AutomationProvider, content::BrowserThread::DeleteOnUIThread>, |
87 public content::TraceSubscriber { | 89 public content::TraceSubscriber { |
88 public: | 90 public: |
89 explicit AutomationProvider(Profile* profile); | 91 explicit AutomationProvider(Profile* profile); |
90 | 92 |
91 Profile* profile() const { return profile_; } | 93 Profile* profile() const { return profile_; } |
92 | 94 |
93 void set_profile(Profile* profile); | 95 void set_profile(Profile* profile); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // connected, without waiting for the initial load conditions to be met. | 128 // connected, without waiting for the initial load conditions to be met. |
127 void DisableInitialLoadObservers(); | 129 void DisableInitialLoadObservers(); |
128 | 130 |
129 // Get the index of a particular NavigationController object | 131 // Get the index of a particular NavigationController object |
130 // in the given parent window. This method uses | 132 // in the given parent window. This method uses |
131 // TabStrip::GetIndexForNavigationController to get the index. | 133 // TabStrip::GetIndexForNavigationController to get the index. |
132 int GetIndexForNavigationController( | 134 int GetIndexForNavigationController( |
133 const content::NavigationController* controller, | 135 const content::NavigationController* controller, |
134 const Browser* parent) const; | 136 const Browser* parent) const; |
135 | 137 |
136 // IPC::Channel::Sender implementation. | 138 // IPC::Sender implementation. |
137 virtual bool Send(IPC::Message* msg) OVERRIDE; | 139 virtual bool Send(IPC::Message* msg) OVERRIDE; |
138 | 140 |
139 // IPC::Channel::Listener implementation. | 141 // IPC::Listener implementation. |
140 virtual void OnChannelConnected(int pid) OVERRIDE; | 142 virtual void OnChannelConnected(int pid) OVERRIDE; |
141 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 143 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
142 virtual void OnChannelError() OVERRIDE; | 144 virtual void OnChannelError() OVERRIDE; |
143 | 145 |
144 IPC::Message* reply_message_release() { | 146 IPC::Message* reply_message_release() { |
145 IPC::Message* reply_message = reply_message_; | 147 IPC::Message* reply_message = reply_message_; |
146 reply_message_ = NULL; | 148 reply_message_ = NULL; |
147 return reply_message; | 149 return reply_message; |
148 } | 150 } |
149 | 151 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 std::string channel_id_; | 367 std::string channel_id_; |
366 | 368 |
367 // Trace data that has been collected but not flushed to the automation | 369 // Trace data that has been collected but not flushed to the automation |
368 // client. | 370 // client. |
369 TracingData tracing_data_; | 371 TracingData tracing_data_; |
370 | 372 |
371 DISALLOW_COPY_AND_ASSIGN(AutomationProvider); | 373 DISALLOW_COPY_AND_ASSIGN(AutomationProvider); |
372 }; | 374 }; |
373 | 375 |
374 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ | 376 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ |
OLD | NEW |