Index: extensions/shell/browser/shell_nacl_browser_delegate.h |
diff --git a/chrome/browser/nacl_host/nacl_browser_delegate_impl.h b/extensions/shell/browser/shell_nacl_browser_delegate.h |
similarity index 64% |
copy from chrome/browser/nacl_host/nacl_browser_delegate_impl.h |
copy to extensions/shell/browser/shell_nacl_browser_delegate.h |
index dd25389308c842ae249e56db2888712d3ac3a55c..0b4467aec194fc31186e5998dcb2be2ab3eb5b56 100644 |
--- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.h |
+++ b/extensions/shell/browser/shell_nacl_browser_delegate.h |
@@ -1,28 +1,30 @@ |
-// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ |
-#define CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ |
- |
-#include <set> |
-#include <string> |
+#ifndef EXTENSIONS_SHELL_BROWSER_SHELL_NACL_BROWSER_DELEGATE_H_ |
+#define EXTENSIONS_SHELL_BROWSER_SHELL_NACL_BROWSER_DELEGATE_H_ |
#include "base/compiler_specific.h" |
+#include "base/macros.h" |
#include "components/nacl/browser/nacl_browser_delegate.h" |
-#include "extensions/common/url_pattern.h" |
-namespace extensions { |
-class InfoMap; |
+namespace content { |
+class BrowserContext; |
} |
-class ProfileManager; |
+namespace extensions { |
+class InfoMap; |
-class NaClBrowserDelegateImpl : public NaClBrowserDelegate { |
+// A lightweight NaClBrowserDelegate for app_shell. Only supports a single |
+// BrowserContext. |
+class ShellNaClBrowserDelegate : public NaClBrowserDelegate { |
public: |
- explicit NaClBrowserDelegateImpl(ProfileManager* profile_manager); |
- virtual ~NaClBrowserDelegateImpl(); |
+ // Uses |context| to look up extensions via InfoMap on the IO thread. |
+ explicit ShellNaClBrowserDelegate(content::BrowserContext* context); |
+ virtual ~ShellNaClBrowserDelegate(); |
+ // NaClBrowserDelegate overrides: |
virtual void ShowMissingArchInfobar(int render_process_id, |
int render_view_id) OVERRIDE; |
virtual bool DialogsAreSuppressed() OVERRIDE; |
@@ -45,14 +47,11 @@ class NaClBrowserDelegateImpl : public NaClBrowserDelegate { |
const GURL& manifest_url) OVERRIDE; |
private: |
- scoped_refptr<extensions::InfoMap> GetExtensionInfoMap( |
- const base::FilePath& profile_directory); |
- ProfileManager* profile_manager_; |
- std::vector<URLPattern> debug_patterns_; |
- bool inverse_debug_patterns_; |
- std::set<std::string> allowed_nonsfi_origins_; |
- DISALLOW_COPY_AND_ASSIGN(NaClBrowserDelegateImpl); |
+ content::BrowserContext* browser_context_; // Not owned. |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ShellNaClBrowserDelegate); |
}; |
+} // namespace extensions |
-#endif // CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ |
+#endif // EXTENSIONS_SHELL_BROWSER_SHELL_NACL_BROWSER_DELEGATE_H_ |