OLD | NEW |
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/ui/webui/extensions/extension_settings_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 return result; | 1011 return result; |
1012 } | 1012 } |
1013 | 1013 |
1014 void ExtensionSettingsHandler::GetInspectablePagesForExtensionProcess( | 1014 void ExtensionSettingsHandler::GetInspectablePagesForExtensionProcess( |
1015 const std::set<RenderViewHost*>& views, | 1015 const std::set<RenderViewHost*>& views, |
1016 std::vector<ExtensionPage>* result) { | 1016 std::vector<ExtensionPage>* result) { |
1017 for (std::set<RenderViewHost*>::const_iterator iter = views.begin(); | 1017 for (std::set<RenderViewHost*>::const_iterator iter = views.begin(); |
1018 iter != views.end(); ++iter) { | 1018 iter != views.end(); ++iter) { |
1019 RenderViewHost* host = *iter; | 1019 RenderViewHost* host = *iter; |
1020 WebContents* web_contents = WebContents::FromRenderViewHost(host); | 1020 WebContents* web_contents = WebContents::FromRenderViewHost(host); |
1021 chrome::ViewType host_type = chrome::GetViewType(web_contents); | 1021 extensions::ViewType host_type = chrome::GetViewType(web_contents); |
1022 if (host == deleting_rvh_ || | 1022 if (host == deleting_rvh_ || |
1023 chrome::VIEW_TYPE_EXTENSION_POPUP == host_type || | 1023 extensions::VIEW_TYPE_EXTENSION_POPUP == host_type || |
1024 chrome::VIEW_TYPE_EXTENSION_DIALOG == host_type) | 1024 extensions::VIEW_TYPE_EXTENSION_DIALOG == host_type) |
1025 continue; | 1025 continue; |
1026 | 1026 |
1027 GURL url = web_contents->GetURL(); | 1027 GURL url = web_contents->GetURL(); |
1028 content::RenderProcessHost* process = host->GetProcess(); | 1028 content::RenderProcessHost* process = host->GetProcess(); |
1029 result->push_back( | 1029 result->push_back( |
1030 ExtensionPage(url, process->GetID(), host->GetRoutingID(), | 1030 ExtensionPage(url, process->GetID(), host->GetRoutingID(), |
1031 process->GetBrowserContext()->IsOffTheRecord())); | 1031 process->GetBrowserContext()->IsOffTheRecord())); |
1032 } | 1032 } |
1033 } | 1033 } |
1034 | 1034 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 std::vector<std::string> requirement_errors) { | 1077 std::vector<std::string> requirement_errors) { |
1078 if (requirement_errors.empty()) { | 1078 if (requirement_errors.empty()) { |
1079 extension_service_->EnableExtension(extension_id); | 1079 extension_service_->EnableExtension(extension_id); |
1080 } else { | 1080 } else { |
1081 ExtensionErrorReporter::GetInstance()->ReportError( | 1081 ExtensionErrorReporter::GetInstance()->ReportError( |
1082 UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1082 UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
1083 true /* be noisy */); | 1083 true /* be noisy */); |
1084 } | 1084 } |
1085 requirements_checker_.reset(); | 1085 requirements_checker_.reset(); |
1086 } | 1086 } |
OLD | NEW |