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 10 matching lines...) Expand all Loading... |
21 #include "base/compiler_specific.h" | 21 #include "base/compiler_specific.h" |
22 #include "base/memory/scoped_ptr.h" | 22 #include "base/memory/scoped_ptr.h" |
23 #include "base/memory/weak_ptr.h" | 23 #include "base/memory/weak_ptr.h" |
24 #include "base/message_loop_helpers.h" | 24 #include "base/message_loop_helpers.h" |
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/browser/trace_controller.h" | |
32 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
33 #include "content/public/browser/notification_observer.h" | 32 #include "content/public/browser/notification_observer.h" |
| 33 #include "content/public/browser/trace_subscriber.h" |
34 #include "ipc/ipc_channel.h" | 34 #include "ipc/ipc_channel.h" |
35 | 35 |
36 #if defined(OS_WIN) && !defined(USE_AURA) | 36 #if defined(OS_WIN) && !defined(USE_AURA) |
37 #include "ui/gfx/native_widget_types.h" | 37 #include "ui/gfx/native_widget_types.h" |
38 #include "ui/views/events/event.h" | 38 #include "ui/views/events/event.h" |
39 #endif // defined(OS_WIN) && !defined(USE_AURA) | 39 #endif // defined(OS_WIN) && !defined(USE_AURA) |
40 | 40 |
41 class AutomationBrowserTracker; | 41 class AutomationBrowserTracker; |
42 class AutomationExtensionTracker; | 42 class AutomationExtensionTracker; |
43 class AutomationResourceMessageFilter; | 43 class AutomationResourceMessageFilter; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 namespace gfx { | 79 namespace gfx { |
80 class Point; | 80 class Point; |
81 } | 81 } |
82 | 82 |
83 class AutomationProvider | 83 class AutomationProvider |
84 : public IPC::Channel::Listener, | 84 : public IPC::Channel::Listener, |
85 public IPC::Message::Sender, | 85 public IPC::Message::Sender, |
86 public base::SupportsWeakPtr<AutomationProvider>, | 86 public base::SupportsWeakPtr<AutomationProvider>, |
87 public base::RefCountedThreadSafe< | 87 public base::RefCountedThreadSafe< |
88 AutomationProvider, content::BrowserThread::DeleteOnUIThread>, | 88 AutomationProvider, content::BrowserThread::DeleteOnUIThread>, |
89 public TraceSubscriber { | 89 public content::TraceSubscriber { |
90 public: | 90 public: |
91 explicit AutomationProvider(Profile* profile); | 91 explicit AutomationProvider(Profile* profile); |
92 | 92 |
93 Profile* profile() const { return profile_; } | 93 Profile* profile() const { return profile_; } |
94 | 94 |
95 // Initializes a channel for a connection to an AutomationProxy. | 95 // Initializes a channel for a connection to an AutomationProxy. |
96 // If channel_id starts with kNamedInterfacePrefix, it will act | 96 // If channel_id starts with kNamedInterfacePrefix, it will act |
97 // as a server, create a named IPC socket with channel_id as its | 97 // as a server, create a named IPC socket with channel_id as its |
98 // path, and will listen on the socket for incoming connections. | 98 // path, and will listen on the socket for incoming connections. |
99 // If channel_id does not, it will act as a client and establish | 99 // If channel_id does not, it will act as a client and establish |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 std::string channel_id_; | 430 std::string channel_id_; |
431 | 431 |
432 // Trace data that has been collected but not flushed to the automation | 432 // Trace data that has been collected but not flushed to the automation |
433 // client. | 433 // client. |
434 TracingData tracing_data_; | 434 TracingData tracing_data_; |
435 | 435 |
436 DISALLOW_COPY_AND_ASSIGN(AutomationProvider); | 436 DISALLOW_COPY_AND_ASSIGN(AutomationProvider); |
437 }; | 437 }; |
438 | 438 |
439 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ | 439 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ |
OLD | NEW |