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

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, 10 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 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 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after
3673 for (ExtensionList::const_iterator it = all.begin(); 3674 for (ExtensionList::const_iterator it = all.begin();
3674 it != all.end(); ++it) { 3675 it != all.end(); ++it) {
3675 const Extension* extension = *it; 3676 const Extension* extension = *it;
3676 std::string id = extension->id(); 3677 std::string id = extension->id();
3677 DictionaryValue* extension_value = new DictionaryValue; 3678 DictionaryValue* extension_value = new DictionaryValue;
3678 extension_value->SetString("id", id); 3679 extension_value->SetString("id", id);
3679 extension_value->SetString("version", extension->VersionString()); 3680 extension_value->SetString("version", extension->VersionString());
3680 extension_value->SetString("name", extension->name()); 3681 extension_value->SetString("name", extension->name());
3681 extension_value->SetString("public_key", extension->public_key()); 3682 extension_value->SetString("public_key", extension->public_key());
3682 extension_value->SetString("description", extension->description()); 3683 extension_value->SetString("description", extension->description());
3683 extension_value->SetString("background_url", 3684 extension_value->SetString(
3684 extension->GetBackgroundURL().spec()); 3685 "background_url",
3686 extensions::BackgroundInfo::GetBackgroundURL(extension).spec());
3685 extension_value->SetString("options_url", 3687 extension_value->SetString("options_url",
3686 extensions::ManifestURL::GetOptionsPage(extension).spec()); 3688 extensions::ManifestURL::GetOptionsPage(extension).spec());
3687 extension_value->Set("host_permissions", 3689 extension_value->Set("host_permissions",
3688 GetHostPermissions(extension, false)); 3690 GetHostPermissions(extension, false));
3689 extension_value->Set("effective_host_permissions", 3691 extension_value->Set("effective_host_permissions",
3690 GetHostPermissions(extension, true)); 3692 GetHostPermissions(extension, true));
3691 extension_value->Set("api_permissions", GetAPIPermissions(extension)); 3693 extension_value->Set("api_permissions", GetAPIPermissions(extension));
3692 Manifest::Location location = extension->location(); 3694 Manifest::Location location = extension->location();
3693 extension_value->SetBoolean("is_component", 3695 extension_value->SetBoolean("is_component",
3694 location == Manifest::COMPONENT); 3696 location == Manifest::COMPONENT);
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after
5917 if (g_browser_process) 5919 if (g_browser_process)
5918 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 5920 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
5919 } 5921 }
5920 5922
5921 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, 5923 void TestingAutomationProvider::EnsureTabSelected(Browser* browser,
5922 WebContents* tab) { 5924 WebContents* tab) {
5923 TabStripModel* tab_strip = browser->tab_strip_model(); 5925 TabStripModel* tab_strip = browser->tab_strip_model();
5924 if (tab_strip->GetActiveWebContents() != tab) 5926 if (tab_strip->GetActiveWebContents() != tab)
5925 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); 5927 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true);
5926 } 5928 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698