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

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

Issue 11742005: Move [Homepage,Options,Update,DevTools]URL out of Extension (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: 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/devtools/devtools_window.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/ui/startup/startup_types.h" 113 #include "chrome/browser/ui/startup/startup_types.h"
114 #include "chrome/browser/view_type_utils.h" 114 #include "chrome/browser/view_type_utils.h"
115 #include "chrome/common/automation_constants.h" 115 #include "chrome/common/automation_constants.h"
116 #include "chrome/common/automation_events.h" 116 #include "chrome/common/automation_events.h"
117 #include "chrome/common/automation_id.h" 117 #include "chrome/common/automation_id.h"
118 #include "chrome/common/automation_messages.h" 118 #include "chrome/common/automation_messages.h"
119 #include "chrome/common/chrome_constants.h" 119 #include "chrome/common/chrome_constants.h"
120 #include "chrome/common/chrome_notification_types.h" 120 #include "chrome/common/chrome_notification_types.h"
121 #include "chrome/common/chrome_paths.h" 121 #include "chrome/common/chrome_paths.h"
122 #include "chrome/common/chrome_switches.h" 122 #include "chrome/common/chrome_switches.h"
123 #include "chrome/common/extensions/api/extension_urls/extension_urls_handler.h"
123 #include "chrome/common/extensions/extension.h" 124 #include "chrome/common/extensions/extension.h"
124 #include "chrome/common/extensions/permissions/permission_set.h" 125 #include "chrome/common/extensions/permissions/permission_set.h"
125 #include "chrome/common/pref_names.h" 126 #include "chrome/common/pref_names.h"
126 #include "chrome/common/render_messages.h" 127 #include "chrome/common/render_messages.h"
127 #include "content/public/browser/browser_child_process_host_iterator.h" 128 #include "content/public/browser/browser_child_process_host_iterator.h"
128 #include "content/public/browser/child_process_data.h" 129 #include "content/public/browser/child_process_data.h"
129 #include "content/public/browser/favicon_status.h" 130 #include "content/public/browser/favicon_status.h"
130 #include "content/public/browser/geolocation.h" 131 #include "content/public/browser/geolocation.h"
131 #include "content/public/browser/interstitial_page.h" 132 #include "content/public/browser/interstitial_page.h"
132 #include "content/public/browser/interstitial_page_delegate.h" 133 #include "content/public/browser/interstitial_page_delegate.h"
(...skipping 3584 matching lines...) Expand 10 before | Expand all | Expand 10 after
3717 const Extension* extension = *it; 3718 const Extension* extension = *it;
3718 std::string id = extension->id(); 3719 std::string id = extension->id();
3719 DictionaryValue* extension_value = new DictionaryValue; 3720 DictionaryValue* extension_value = new DictionaryValue;
3720 extension_value->SetString("id", id); 3721 extension_value->SetString("id", id);
3721 extension_value->SetString("version", extension->VersionString()); 3722 extension_value->SetString("version", extension->VersionString());
3722 extension_value->SetString("name", extension->name()); 3723 extension_value->SetString("name", extension->name());
3723 extension_value->SetString("public_key", extension->public_key()); 3724 extension_value->SetString("public_key", extension->public_key());
3724 extension_value->SetString("description", extension->description()); 3725 extension_value->SetString("description", extension->description());
3725 extension_value->SetString("background_url", 3726 extension_value->SetString("background_url",
3726 extension->GetBackgroundURL().spec()); 3727 extension->GetBackgroundURL().spec());
3727 extension_value->SetString("options_url", 3728 extension_value->SetString(
3728 extension->options_url().spec()); 3729 "options_url",
3730 extensions::ExtensionURL::GetOptionsURL(extension).spec());
3729 extension_value->Set("host_permissions", 3731 extension_value->Set("host_permissions",
3730 GetHostPermissions(extension, false)); 3732 GetHostPermissions(extension, false));
3731 extension_value->Set("effective_host_permissions", 3733 extension_value->Set("effective_host_permissions",
3732 GetHostPermissions(extension, true)); 3734 GetHostPermissions(extension, true));
3733 extension_value->Set("api_permissions", GetAPIPermissions(extension)); 3735 extension_value->Set("api_permissions", GetAPIPermissions(extension));
3734 Extension::Location location = extension->location(); 3736 Extension::Location location = extension->location();
3735 extension_value->SetBoolean("is_component", 3737 extension_value->SetBoolean("is_component",
3736 location == Extension::COMPONENT); 3738 location == Extension::COMPONENT);
3737 extension_value->SetBoolean("is_internal", 3739 extension_value->SetBoolean("is_internal",
3738 location == Extension::INTERNAL); 3740 location == Extension::INTERNAL);
(...skipping 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after
6276 if (g_browser_process) 6278 if (g_browser_process)
6277 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6279 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6278 } 6280 }
6279 6281
6280 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, 6282 void TestingAutomationProvider::EnsureTabSelected(Browser* browser,
6281 WebContents* tab) { 6283 WebContents* tab) {
6282 TabStripModel* tab_strip = browser->tab_strip_model(); 6284 TabStripModel* tab_strip = browser->tab_strip_model();
6283 if (tab_strip->GetActiveWebContents() != tab) 6285 if (tab_strip->GetActiveWebContents() != tab)
6284 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); 6286 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true);
6285 } 6287 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698