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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 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) 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 // 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 namespace gfx { 80 namespace gfx {
81 class Point; 81 class Point;
82 } 82 }
83 83
84 class AutomationProvider 84 class AutomationProvider
85 : public IPC::Channel::Listener, 85 : public IPC::Channel::Listener,
86 public IPC::Message::Sender, 86 public IPC::Message::Sender,
87 public base::SupportsWeakPtr<AutomationProvider>, 87 public base::SupportsWeakPtr<AutomationProvider>,
88 public base::RefCountedThreadSafe<AutomationProvider, 88 public base::RefCountedThreadSafe<
89 BrowserThread::DeleteOnUIThread>, 89 AutomationProvider, content::BrowserThread::DeleteOnUIThread>,
90 public TraceSubscriber { 90 public TraceSubscriber {
91 public: 91 public:
92 explicit AutomationProvider(Profile* profile); 92 explicit AutomationProvider(Profile* profile);
93 93
94 Profile* profile() const { return profile_; } 94 Profile* profile() const { return profile_; }
95 95
96 // Initializes a channel for a connection to an AutomationProxy. 96 // Initializes a channel for a connection to an AutomationProxy.
97 // If channel_id starts with kNamedInterfacePrefix, it will act 97 // If channel_id starts with kNamedInterfacePrefix, it will act
98 // as a server, create a named IPC socket with channel_id as its 98 // as a server, create a named IPC socket with channel_id as its
99 // path, and will listen on the socket for incoming connections. 99 // path, and will listen on the socket for incoming connections.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // Adds the external tab passed in to the tab tracker. 156 // Adds the external tab passed in to the tab tracker.
157 bool AddExternalTab(ExternalTabContainer* external_tab); 157 bool AddExternalTab(ExternalTabContainer* external_tab);
158 #endif 158 #endif
159 159
160 // Get the DictionaryValue equivalent for a download item. Caller owns the 160 // Get the DictionaryValue equivalent for a download item. Caller owns the
161 // DictionaryValue. 161 // DictionaryValue.
162 base::DictionaryValue* GetDictionaryFromDownloadItem( 162 base::DictionaryValue* GetDictionaryFromDownloadItem(
163 const DownloadItem* download); 163 const DownloadItem* download);
164 164
165 protected: 165 protected:
166 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; 166 friend struct content::BrowserThread::DeleteOnThread<
167 content::BrowserThread::UI>;
167 friend class DeleteTask<AutomationProvider>; 168 friend class DeleteTask<AutomationProvider>;
168 virtual ~AutomationProvider(); 169 virtual ~AutomationProvider();
169 170
170 // Helper function to find the browser window that contains a given 171 // Helper function to find the browser window that contains a given
171 // NavigationController and activate that tab. 172 // NavigationController and activate that tab.
172 // Returns the Browser if found. 173 // Returns the Browser if found.
173 Browser* FindAndActivateTab(NavigationController* contents); 174 Browser* FindAndActivateTab(NavigationController* contents);
174 175
175 // Convert a tab handle into a TabContents. If |tab| is non-NULL a pointer 176 // Convert a tab handle into a TabContents. If |tab| is non-NULL a pointer
176 // to the tab is also returned. Returns NULL in case of failure or if the tab 177 // to the tab is also returned. Returns NULL in case of failure or if the tab
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 std::string channel_id_; 414 std::string channel_id_;
414 415
415 // Trace data that has been collected but not flushed to the automation 416 // Trace data that has been collected but not flushed to the automation
416 // client. 417 // client.
417 TracingData tracing_data_; 418 TracingData tracing_data_;
418 419
419 DISALLOW_COPY_AND_ASSIGN(AutomationProvider); 420 DISALLOW_COPY_AND_ASSIGN(AutomationProvider);
420 }; 421 };
421 422
422 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ 423 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/phone_number_i18n_unittest.cc ('k') | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698