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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 11312228: Move extension_error_utils.* and url_pattern_set.* into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hate Created 8 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) 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 #include "chrome/browser/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 #include "chrome/common/automation_constants.h" 120 #include "chrome/common/automation_constants.h"
121 #include "chrome/common/automation_events.h" 121 #include "chrome/common/automation_events.h"
122 #include "chrome/common/automation_id.h" 122 #include "chrome/common/automation_id.h"
123 #include "chrome/common/automation_messages.h" 123 #include "chrome/common/automation_messages.h"
124 #include "chrome/common/chrome_constants.h" 124 #include "chrome/common/chrome_constants.h"
125 #include "chrome/common/chrome_notification_types.h" 125 #include "chrome/common/chrome_notification_types.h"
126 #include "chrome/common/chrome_paths.h" 126 #include "chrome/common/chrome_paths.h"
127 #include "chrome/common/chrome_switches.h" 127 #include "chrome/common/chrome_switches.h"
128 #include "chrome/common/extensions/extension.h" 128 #include "chrome/common/extensions/extension.h"
129 #include "chrome/common/extensions/permissions/permission_set.h" 129 #include "chrome/common/extensions/permissions/permission_set.h"
130 #include "chrome/common/extensions/url_pattern_set.h"
131 #include "chrome/common/pref_names.h" 130 #include "chrome/common/pref_names.h"
132 #include "chrome/common/render_messages.h" 131 #include "chrome/common/render_messages.h"
133 #include "content/public/browser/browser_child_process_host_iterator.h" 132 #include "content/public/browser/browser_child_process_host_iterator.h"
134 #include "content/public/browser/child_process_data.h" 133 #include "content/public/browser/child_process_data.h"
135 #include "content/public/browser/favicon_status.h" 134 #include "content/public/browser/favicon_status.h"
136 #include "content/public/browser/geolocation.h" 135 #include "content/public/browser/geolocation.h"
137 #include "content/public/browser/interstitial_page.h" 136 #include "content/public/browser/interstitial_page.h"
138 #include "content/public/browser/interstitial_page_delegate.h" 137 #include "content/public/browser/interstitial_page_delegate.h"
139 #include "content/public/browser/navigation_entry.h" 138 #include "content/public/browser/navigation_entry.h"
140 #include "content/public/browser/notification_service.h" 139 #include "content/public/browser/notification_service.h"
141 #include "content/public/browser/plugin_service.h" 140 #include "content/public/browser/plugin_service.h"
142 #include "content/public/browser/render_process_host.h" 141 #include "content/public/browser/render_process_host.h"
143 #include "content/public/browser/render_view_host.h" 142 #include "content/public/browser/render_view_host.h"
144 #include "content/public/browser/render_widget_host_view.h" 143 #include "content/public/browser/render_widget_host_view.h"
145 #include "content/public/browser/web_contents.h" 144 #include "content/public/browser/web_contents.h"
146 #include "content/public/common/child_process_host.h" 145 #include "content/public/common/child_process_host.h"
147 #include "content/public/common/common_param_traits.h" 146 #include "content/public/common/common_param_traits.h"
148 #include "content/public/common/geoposition.h" 147 #include "content/public/common/geoposition.h"
149 #include "content/public/common/ssl_status.h" 148 #include "content/public/common/ssl_status.h"
150 #include "extensions/common/url_pattern.h" 149 #include "extensions/common/url_pattern.h"
150 #include "extensions/common/url_pattern_set.h"
151 #include "net/cookies/cookie_store.h" 151 #include "net/cookies/cookie_store.h"
152 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 152 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
153 #include "ui/base/events/event_constants.h" 153 #include "ui/base/events/event_constants.h"
154 #include "ui/base/keycodes/keyboard_codes.h" 154 #include "ui/base/keycodes/keyboard_codes.h"
155 #include "ui/base/ui_base_types.h" 155 #include "ui/base/ui_base_types.h"
156 #include "ui/ui_controls/ui_controls.h" 156 #include "ui/ui_controls/ui_controls.h"
157 #include "webkit/glue/webdropdata.h" 157 #include "webkit/glue/webdropdata.h"
158 #include "webkit/plugins/webplugininfo.h" 158 #include "webkit/plugins/webplugininfo.h"
159 159
160 #if defined(ENABLE_CONFIGURATION_POLICY) 160 #if defined(ENABLE_CONFIGURATION_POLICY)
(...skipping 3568 matching lines...) Expand 10 before | Expand all | Expand 10 after
3729 } 3729 }
3730 } else { 3730 } else {
3731 AutomationJSONReply(this, reply_message).SendError( 3731 AutomationJSONReply(this, reply_message).SendError(
3732 "Extensions service/process manager is not available"); 3732 "Extensions service/process manager is not available");
3733 } 3733 }
3734 } 3734 }
3735 3735
3736 namespace { 3736 namespace {
3737 3737
3738 ListValue* GetHostPermissions(const Extension* ext, bool effective_perm) { 3738 ListValue* GetHostPermissions(const Extension* ext, bool effective_perm) {
3739 URLPatternSet pattern_set; 3739 extensions::URLPatternSet pattern_set;
3740 if (effective_perm) 3740 if (effective_perm)
3741 pattern_set = ext->GetEffectiveHostPermissions(); 3741 pattern_set = ext->GetEffectiveHostPermissions();
3742 else 3742 else
3743 pattern_set = ext->GetActivePermissions()->explicit_hosts(); 3743 pattern_set = ext->GetActivePermissions()->explicit_hosts();
3744 3744
3745 ListValue* permissions = new ListValue; 3745 ListValue* permissions = new ListValue;
3746 for (URLPatternSet::const_iterator perm = pattern_set.begin(); 3746 for (extensions::URLPatternSet::const_iterator perm = pattern_set.begin();
3747 perm != pattern_set.end(); ++perm) { 3747 perm != pattern_set.end(); ++perm) {
3748 permissions->Append(new StringValue(perm->GetAsString())); 3748 permissions->Append(new StringValue(perm->GetAsString()));
3749 } 3749 }
3750 3750
3751 return permissions; 3751 return permissions;
3752 } 3752 }
3753 3753
3754 ListValue* GetAPIPermissions(const Extension* ext) { 3754 ListValue* GetAPIPermissions(const Extension* ext) {
3755 ListValue* permissions = new ListValue; 3755 ListValue* permissions = new ListValue;
3756 std::set<std::string> perm_list = 3756 std::set<std::string> perm_list =
(...skipping 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after
6351 if (g_browser_process) 6351 if (g_browser_process)
6352 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6352 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6353 } 6353 }
6354 6354
6355 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, 6355 void TestingAutomationProvider::EnsureTabSelected(Browser* browser,
6356 WebContents* tab) { 6356 WebContents* tab) {
6357 TabStripModel* tab_strip = browser->tab_strip_model(); 6357 TabStripModel* tab_strip = browser->tab_strip_model();
6358 if (tab_strip->GetActiveWebContents() != tab) 6358 if (tab_strip->GetActiveWebContents() != tab)
6359 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); 6359 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true);
6360 } 6360 }
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/accessibility_extension_api.cc ('k') | chrome/browser/chromeos/extensions/file_handler_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698