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

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

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #include "chrome/browser/ui/startup/startup_types.h" 110 #include "chrome/browser/ui/startup/startup_types.h"
111 #include "chrome/browser/view_type_utils.h" 111 #include "chrome/browser/view_type_utils.h"
112 #include "chrome/common/automation_constants.h" 112 #include "chrome/common/automation_constants.h"
113 #include "chrome/common/automation_events.h" 113 #include "chrome/common/automation_events.h"
114 #include "chrome/common/automation_id.h" 114 #include "chrome/common/automation_id.h"
115 #include "chrome/common/automation_messages.h" 115 #include "chrome/common/automation_messages.h"
116 #include "chrome/common/chrome_constants.h" 116 #include "chrome/common/chrome_constants.h"
117 #include "chrome/common/chrome_notification_types.h" 117 #include "chrome/common/chrome_notification_types.h"
118 #include "chrome/common/chrome_paths.h" 118 #include "chrome/common/chrome_paths.h"
119 #include "chrome/common/chrome_switches.h" 119 #include "chrome/common/chrome_switches.h"
120 #include "chrome/common/extensions/background_info.h"
120 #include "chrome/common/extensions/extension.h" 121 #include "chrome/common/extensions/extension.h"
121 #include "chrome/common/extensions/manifest_url_handler.h" 122 #include "chrome/common/extensions/manifest_url_handler.h"
122 #include "chrome/common/extensions/permissions/permission_set.h" 123 #include "chrome/common/extensions/permissions/permission_set.h"
123 #include "chrome/common/pref_names.h" 124 #include "chrome/common/pref_names.h"
124 #include "chrome/common/render_messages.h" 125 #include "chrome/common/render_messages.h"
125 #include "content/public/browser/browser_child_process_host_iterator.h" 126 #include "content/public/browser/browser_child_process_host_iterator.h"
126 #include "content/public/browser/child_process_data.h" 127 #include "content/public/browser/child_process_data.h"
127 #include "content/public/browser/favicon_status.h" 128 #include "content/public/browser/favicon_status.h"
128 #include "content/public/browser/geolocation.h" 129 #include "content/public/browser/geolocation.h"
129 #include "content/public/browser/interstitial_page.h" 130 #include "content/public/browser/interstitial_page.h"
(...skipping 3539 matching lines...) Expand 10 before | Expand all | Expand 10 after
3669 for (ExtensionList::const_iterator it = all.begin(); 3670 for (ExtensionList::const_iterator it = all.begin();
3670 it != all.end(); ++it) { 3671 it != all.end(); ++it) {
3671 const Extension* extension = *it; 3672 const Extension* extension = *it;
3672 std::string id = extension->id(); 3673 std::string id = extension->id();
3673 DictionaryValue* extension_value = new DictionaryValue; 3674 DictionaryValue* extension_value = new DictionaryValue;
3674 extension_value->SetString("id", id); 3675 extension_value->SetString("id", id);
3675 extension_value->SetString("version", extension->VersionString()); 3676 extension_value->SetString("version", extension->VersionString());
3676 extension_value->SetString("name", extension->name()); 3677 extension_value->SetString("name", extension->name());
3677 extension_value->SetString("public_key", extension->public_key()); 3678 extension_value->SetString("public_key", extension->public_key());
3678 extension_value->SetString("description", extension->description()); 3679 extension_value->SetString("description", extension->description());
3679 extension_value->SetString("background_url", 3680 extension_value->SetString(
3680 extension->GetBackgroundURL().spec()); 3681 "background_url",
3682 extensions::BackgroundInfo::GetBackgroundURL(extension).spec());
3681 extension_value->SetString("options_url", 3683 extension_value->SetString("options_url",
3682 extensions::ManifestURL::GetOptionsPage(extension).spec()); 3684 extensions::ManifestURL::GetOptionsPage(extension).spec());
3683 extension_value->Set("host_permissions", 3685 extension_value->Set("host_permissions",
3684 GetHostPermissions(extension, false)); 3686 GetHostPermissions(extension, false));
3685 extension_value->Set("effective_host_permissions", 3687 extension_value->Set("effective_host_permissions",
3686 GetHostPermissions(extension, true)); 3688 GetHostPermissions(extension, true));
3687 extension_value->Set("api_permissions", GetAPIPermissions(extension)); 3689 extension_value->Set("api_permissions", GetAPIPermissions(extension));
3688 Manifest::Location location = extension->location(); 3690 Manifest::Location location = extension->location();
3689 extension_value->SetBoolean("is_component", 3691 extension_value->SetBoolean("is_component",
3690 location == Manifest::COMPONENT); 3692 location == Manifest::COMPONENT);
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after
5913 if (g_browser_process) 5915 if (g_browser_process)
5914 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 5916 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
5915 } 5917 }
5916 5918
5917 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, 5919 void TestingAutomationProvider::EnsureTabSelected(Browser* browser,
5918 WebContents* tab) { 5920 WebContents* tab) {
5919 TabStripModel* tab_strip = browser->tab_strip_model(); 5921 TabStripModel* tab_strip = browser->tab_strip_model();
5920 if (tab_strip->GetActiveWebContents() != tab) 5922 if (tab_strip->GetActiveWebContents() != tab)
5921 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); 5923 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true);
5922 } 5924 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698