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

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

Issue 10536058: TabContentsWrapper -> TabContents, part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GetOwningTabContentsForWebContents Created 8 years, 6 months 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) 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_AUTOMATION_UTIL_H_ 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_
6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_ 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 12
13 class AutomationId; 13 class AutomationId;
14 class AutomationProvider; 14 class AutomationProvider;
15 class Browser; 15 class Browser;
16 class GURL; 16 class GURL;
17 class Profile; 17 class Profile;
18 class TabContents; 18 class TabContents;
19 typedef TabContents TabContentsWrapper;
20 19
21 namespace content { 20 namespace content {
22 class RenderViewHost; 21 class RenderViewHost;
23 class WebContents; 22 class WebContents;
24 } 23 }
25 24
26 namespace base { 25 namespace base {
27 class DictionaryValue; 26 class DictionaryValue;
28 } 27 }
29 28
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void SetCookieJSON(AutomationProvider* provider, 85 void SetCookieJSON(AutomationProvider* provider,
87 base::DictionaryValue* args, 86 base::DictionaryValue* args,
88 IPC::Message* reply_message); 87 IPC::Message* reply_message);
89 88
90 // Sends a JSON error reply if an app modal dialog is active. Returns whether 89 // Sends a JSON error reply if an app modal dialog is active. Returns whether
91 // an error reply was sent. 90 // an error reply was sent.
92 bool SendErrorIfModalDialogActive(AutomationProvider* provider, 91 bool SendErrorIfModalDialogActive(AutomationProvider* provider,
93 IPC::Message* message); 92 IPC::Message* message);
94 93
95 // Returns a valid automation ID for the given tab. 94 // Returns a valid automation ID for the given tab.
96 AutomationId GetIdForTab(const TabContentsWrapper* tab); 95 AutomationId GetIdForTab(const TabContents* tab);
97 96
98 // Returns a valid automation ID for the extension view. 97 // Returns a valid automation ID for the extension view.
99 AutomationId GetIdForExtensionView( 98 AutomationId GetIdForExtensionView(
100 const content::RenderViewHost* render_view_host); 99 const content::RenderViewHost* render_view_host);
101 100
102 // Returns a valid automation ID for the extension. 101 // Returns a valid automation ID for the extension.
103 AutomationId GetIdForExtension(const extensions::Extension* extension); 102 AutomationId GetIdForExtension(const extensions::Extension* extension);
104 103
105 // Gets the tab for the given ID. Returns true on success. 104 // Gets the tab for the given ID. Returns true on success.
106 bool GetTabForId(const AutomationId& id, content::WebContents** tab); 105 bool GetTabForId(const AutomationId& id, content::WebContents** tab);
107 106
108 // Gets the render view for the given ID. Returns true on success. 107 // Gets the render view for the given ID. Returns true on success.
109 bool GetRenderViewForId(const AutomationId& id, 108 bool GetRenderViewForId(const AutomationId& id,
110 Profile* profile, 109 Profile* profile,
111 content::RenderViewHost** rvh); 110 content::RenderViewHost** rvh);
112 111
113 // Gets the extension for the given ID. Returns true on success. 112 // Gets the extension for the given ID. Returns true on success.
114 bool GetExtensionForId(const AutomationId& id, 113 bool GetExtensionForId(const AutomationId& id,
115 Profile* profile, 114 Profile* profile,
116 const extensions::Extension** extension); 115 const extensions::Extension** extension);
117 116
118 // Returns whether the given ID refers to an actual automation entity. 117 // Returns whether the given ID refers to an actual automation entity.
119 bool DoesObjectWithIdExist(const AutomationId& id, Profile* profile); 118 bool DoesObjectWithIdExist(const AutomationId& id, Profile* profile);
120 119
121 } // namespace automation_util 120 } // namespace automation_util
122 121
123 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_ 122 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698