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

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

Issue 11726002: Move the parsing of 'update_url' & 'options_page' URLs out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url_parse
Patch Set: fixed HomepageURLManifestTest.GetHomepageURL Created 7 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 #include "chrome/browser/view_type_utils.h" 113 #include "chrome/browser/view_type_utils.h"
114 #include "chrome/common/automation_constants.h" 114 #include "chrome/common/automation_constants.h"
115 #include "chrome/common/automation_events.h" 115 #include "chrome/common/automation_events.h"
116 #include "chrome/common/automation_id.h" 116 #include "chrome/common/automation_id.h"
117 #include "chrome/common/automation_messages.h" 117 #include "chrome/common/automation_messages.h"
118 #include "chrome/common/chrome_constants.h" 118 #include "chrome/common/chrome_constants.h"
119 #include "chrome/common/chrome_notification_types.h" 119 #include "chrome/common/chrome_notification_types.h"
120 #include "chrome/common/chrome_paths.h" 120 #include "chrome/common/chrome_paths.h"
121 #include "chrome/common/chrome_switches.h" 121 #include "chrome/common/chrome_switches.h"
122 #include "chrome/common/extensions/extension.h" 122 #include "chrome/common/extensions/extension.h"
123 #include "chrome/common/extensions/manifest_url_handler.h"
123 #include "chrome/common/extensions/permissions/permission_set.h" 124 #include "chrome/common/extensions/permissions/permission_set.h"
124 #include "chrome/common/pref_names.h" 125 #include "chrome/common/pref_names.h"
125 #include "chrome/common/render_messages.h" 126 #include "chrome/common/render_messages.h"
126 #include "content/public/browser/browser_child_process_host_iterator.h" 127 #include "content/public/browser/browser_child_process_host_iterator.h"
127 #include "content/public/browser/child_process_data.h" 128 #include "content/public/browser/child_process_data.h"
128 #include "content/public/browser/favicon_status.h" 129 #include "content/public/browser/favicon_status.h"
129 #include "content/public/browser/geolocation.h" 130 #include "content/public/browser/geolocation.h"
130 #include "content/public/browser/interstitial_page.h" 131 #include "content/public/browser/interstitial_page.h"
131 #include "content/public/browser/interstitial_page_delegate.h" 132 #include "content/public/browser/interstitial_page_delegate.h"
132 #include "content/public/browser/navigation_entry.h" 133 #include "content/public/browser/navigation_entry.h"
(...skipping 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after
3712 std::string id = extension->id(); 3713 std::string id = extension->id();
3713 DictionaryValue* extension_value = new DictionaryValue; 3714 DictionaryValue* extension_value = new DictionaryValue;
3714 extension_value->SetString("id", id); 3715 extension_value->SetString("id", id);
3715 extension_value->SetString("version", extension->VersionString()); 3716 extension_value->SetString("version", extension->VersionString());
3716 extension_value->SetString("name", extension->name()); 3717 extension_value->SetString("name", extension->name());
3717 extension_value->SetString("public_key", extension->public_key()); 3718 extension_value->SetString("public_key", extension->public_key());
3718 extension_value->SetString("description", extension->description()); 3719 extension_value->SetString("description", extension->description());
3719 extension_value->SetString("background_url", 3720 extension_value->SetString("background_url",
3720 extension->GetBackgroundURL().spec()); 3721 extension->GetBackgroundURL().spec());
3721 extension_value->SetString("options_url", 3722 extension_value->SetString("options_url",
3722 extension->options_url().spec()); 3723 extensions::ManifestURL::GetOptionsPage(extension).spec());
3723 extension_value->Set("host_permissions", 3724 extension_value->Set("host_permissions",
3724 GetHostPermissions(extension, false)); 3725 GetHostPermissions(extension, false));
3725 extension_value->Set("effective_host_permissions", 3726 extension_value->Set("effective_host_permissions",
3726 GetHostPermissions(extension, true)); 3727 GetHostPermissions(extension, true));
3727 extension_value->Set("api_permissions", GetAPIPermissions(extension)); 3728 extension_value->Set("api_permissions", GetAPIPermissions(extension));
3728 Extension::Location location = extension->location(); 3729 Extension::Location location = extension->location();
3729 extension_value->SetBoolean("is_component", 3730 extension_value->SetBoolean("is_component",
3730 location == Extension::COMPONENT); 3731 location == Extension::COMPONENT);
3731 extension_value->SetBoolean("is_internal", 3732 extension_value->SetBoolean("is_internal",
3732 location == Extension::INTERNAL); 3733 location == Extension::INTERNAL);
(...skipping 2473 matching lines...) Expand 10 before | Expand all | Expand 10 after
6206 if (g_browser_process) 6207 if (g_browser_process)
6207 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6208 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6208 } 6209 }
6209 6210
6210 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, 6211 void TestingAutomationProvider::EnsureTabSelected(Browser* browser,
6211 WebContents* tab) { 6212 WebContents* tab) {
6212 TabStripModel* tab_strip = browser->tab_strip_model(); 6213 TabStripModel* tab_strip = browser->tab_strip_model();
6213 if (tab_strip->GetActiveWebContents() != tab) 6214 if (tab_strip->GetActiveWebContents() != tab)
6214 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); 6215 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true);
6215 } 6216 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698