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

Side by Side Diff: chrome/browser/external_tab_container.h

Issue 366025: Modifying extension automation so that it is done through a particular... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/extensions/extension_uitest.cc ('k') | chrome/browser/external_tab_container.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_EXTERNAL_TAB_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_
6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ 6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_
7 7
8 #include <vector> 8 #include <vector>
9 #include <map> 9 #include <map>
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // string input to use during initialization). |parent_window| is the window 148 // string input to use during initialization). |parent_window| is the window
149 // that should be parent of the dialog, or NULL for the default. 149 // that should be parent of the dialog, or NULL for the default.
150 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate, 150 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate,
151 gfx::NativeWindow parent_window); 151 gfx::NativeWindow parent_window);
152 152
153 // Returns the ExternalTabContainer instance associated with the cookie 153 // Returns the ExternalTabContainer instance associated with the cookie
154 // passed in. It also erases the corresponding reference from the map. 154 // passed in. It also erases the corresponding reference from the map.
155 // Returns NULL if we fail to find the cookie in the map. 155 // Returns NULL if we fail to find the cookie in the map.
156 static ExternalTabContainer* RemovePendingTab(intptr_t cookie); 156 static ExternalTabContainer* RemovePendingTab(intptr_t cookie);
157 157
158 // Enables extension automation (for e.g. UITests), with the current tab
159 // used as a conduit for the extension API messages being handled by the
160 // automation client.
161 void SetEnableExtensionAutomation(
162 const std::vector<std::string>& functions_enabled);
163
158 protected: 164 protected:
159 // Overridden from views::WidgetWin: 165 // Overridden from views::WidgetWin:
160 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct); 166 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct);
161 virtual void OnDestroy(); 167 virtual void OnDestroy();
162 virtual void OnFinalMessage(HWND window); 168 virtual void OnFinalMessage(HWND window);
163 169
164 bool InitNavigationInfo(IPC::NavigationInfo* nav_info, 170 bool InitNavigationInfo(IPC::NavigationInfo* nav_info,
165 NavigationType::Type nav_type, 171 NavigationType::Type nav_type,
166 int relative_offset); 172 int relative_offset);
167 void Navigate(const GURL& url, const GURL& referrer); 173 void Navigate(const GURL& url, const GURL& referrer);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 209
204 // Scoped browser object for this ExternalTabContainer instance. 210 // Scoped browser object for this ExternalTabContainer instance.
205 scoped_ptr<Browser> browser_; 211 scoped_ptr<Browser> browser_;
206 212
207 // A customized profile for automation specific needs. 213 // A customized profile for automation specific needs.
208 scoped_ptr<AutomationProfileImpl> automation_profile_; 214 scoped_ptr<AutomationProfileImpl> automation_profile_;
209 215
210 // Contains ExternalTabContainers that have not been connected to as yet. 216 // Contains ExternalTabContainers that have not been connected to as yet.
211 static PendingTabs pending_tabs_; 217 static PendingTabs pending_tabs_;
212 218
219 // True if this tab is currently the conduit for extension API automation.
220 bool enabled_extension_automation_;
221
213 // Allows us to run tasks on the ExternalTabContainer instance which are 222 // Allows us to run tasks on the ExternalTabContainer instance which are
214 // bound by its lifetime. 223 // bound by its lifetime.
215 ScopedRunnableMethodFactory<ExternalTabContainer> external_method_factory_; 224 ScopedRunnableMethodFactory<ExternalTabContainer> external_method_factory_;
216 225
217 DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer); 226 DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer);
218 }; 227 };
219 228
220 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ 229 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_uitest.cc ('k') | chrome/browser/external_tab_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698