| Index: components/nacl/common/test_nacl_browser_delegate.h
|
| diff --git a/chrome/browser/nacl_host/nacl_browser_delegate_impl.h b/components/nacl/common/test_nacl_browser_delegate.h
|
| similarity index 56%
|
| copy from chrome/browser/nacl_host/nacl_browser_delegate_impl.h
|
| copy to components/nacl/common/test_nacl_browser_delegate.h
|
| index de75b825ff6a2e52855c9ac337f4154db659305d..fc0f62218a2720e78946f017c354ad2a679ce979 100644
|
| --- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.h
|
| +++ b/components/nacl/common/test_nacl_browser_delegate.h
|
| @@ -2,19 +2,28 @@
|
| // 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_
|
| +#ifndef COMPONENTS_NACL_COMMON_TEST_NACL_BROWSER_DELEGATE_H_
|
| +#define COMPONENTS_NACL_COMMON_TEST_NACL_BROWSER_DELEGATE_H_
|
|
|
| +#include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| -#include "chrome/browser/extensions/extension_info_map.h"
|
| #include "components/nacl/common/nacl_browser_delegate.h"
|
|
|
| -class NaClBrowserDelegateImpl : public NaClBrowserDelegate {
|
| +// This is a base test implementation of NaClBrowserDelegate which
|
| +// does nothing. Individual tests can override the methods further.
|
| +// To use the test delegate:
|
| +//
|
| +// NaClBrowser::SetDelegate(new RefinedTestNaClBrowserDelegate);
|
| +//
|
| +// and
|
| +//
|
| +// NaClBrowser::SetDelegate(NULL); // frees the test delegate.
|
| +class TestNaClBrowserDelegate : public NaClBrowserDelegate {
|
| public:
|
| - explicit NaClBrowserDelegateImpl(ExtensionInfoMap* extension_info_map);
|
| - virtual ~NaClBrowserDelegateImpl();
|
| -
|
| - virtual void ShowNaClInfobar(int render_process_id, int render_view_id,
|
| + TestNaClBrowserDelegate();
|
| + virtual ~TestNaClBrowserDelegate();
|
| + virtual void ShowNaClInfobar(int render_process_id,
|
| + int render_view_id,
|
| int error_id) OVERRIDE;
|
| virtual bool DialogsAreSuppressed() OVERRIDE;
|
| virtual bool GetCacheDirectory(base::FilePath* cache_dir) OVERRIDE;
|
| @@ -25,17 +34,13 @@ class NaClBrowserDelegateImpl : public NaClBrowserDelegate {
|
| virtual ppapi::host::HostFactory* CreatePpapiHostFactory(
|
| content::BrowserPpapiHost* ppapi_host) OVERRIDE;
|
| virtual bool MapUrlToLocalFilePath(const GURL& url,
|
| - bool is_blocking,
|
| + bool use_blocking_api,
|
| base::FilePath* file_path) OVERRIDE;
|
| virtual void SetDebugPatterns(std::string debug_patterns) OVERRIDE;
|
| virtual bool URLMatchesDebugPatterns(const GURL& manifest_url) OVERRIDE;
|
|
|
| private:
|
| - scoped_refptr<ExtensionInfoMap> extension_info_map_;
|
| - std::vector<URLPattern> debug_patterns_;
|
| - bool inverse_debug_patterns_;
|
| - DISALLOW_COPY_AND_ASSIGN(NaClBrowserDelegateImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(TestNaClBrowserDelegate);
|
| };
|
|
|
| -
|
| -#endif // CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_
|
| +#endif // COMPONENTS_NACL_COMMON_TEST_NACL_BROWSER_DELEGATE_H_
|
|
|