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

Side by Side Diff: components/nacl/common/test_nacl_browser_delegate.h

Issue 51323004: Move most of TestNaClBrowserDelegate to another file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix rebase Created 7 years, 1 month 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 | « components/nacl.gyp ('k') | components/nacl/common/test_nacl_browser_delegate.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 #ifndef CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ 5 #ifndef COMPONENTS_NACL_COMMON_TEST_NACL_BROWSER_DELEGATE_H_
6 #define CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ 6 #define COMPONENTS_NACL_COMMON_TEST_NACL_BROWSER_DELEGATE_H_
7 7
8 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
9 #include "chrome/browser/extensions/extension_info_map.h"
10 #include "components/nacl/common/nacl_browser_delegate.h" 10 #include "components/nacl/common/nacl_browser_delegate.h"
11 11
12 class NaClBrowserDelegateImpl : public NaClBrowserDelegate { 12 // This is a base test implementation of NaClBrowserDelegate which
13 // does nothing. Individual tests can override the methods further.
14 // To use the test delegate:
15 //
16 // NaClBrowser::SetDelegate(new RefinedTestNaClBrowserDelegate);
17 //
18 // and
19 //
20 // NaClBrowser::SetDelegate(NULL); // frees the test delegate.
21 class TestNaClBrowserDelegate : public NaClBrowserDelegate {
13 public: 22 public:
14 explicit NaClBrowserDelegateImpl(ExtensionInfoMap* extension_info_map); 23 TestNaClBrowserDelegate();
15 virtual ~NaClBrowserDelegateImpl(); 24 virtual ~TestNaClBrowserDelegate();
16 25 virtual void ShowNaClInfobar(int render_process_id,
17 virtual void ShowNaClInfobar(int render_process_id, int render_view_id, 26 int render_view_id,
18 int error_id) OVERRIDE; 27 int error_id) OVERRIDE;
19 virtual bool DialogsAreSuppressed() OVERRIDE; 28 virtual bool DialogsAreSuppressed() OVERRIDE;
20 virtual bool GetCacheDirectory(base::FilePath* cache_dir) OVERRIDE; 29 virtual bool GetCacheDirectory(base::FilePath* cache_dir) OVERRIDE;
21 virtual bool GetPluginDirectory(base::FilePath* plugin_dir) OVERRIDE; 30 virtual bool GetPluginDirectory(base::FilePath* plugin_dir) OVERRIDE;
22 virtual bool GetPnaclDirectory(base::FilePath* pnacl_dir) OVERRIDE; 31 virtual bool GetPnaclDirectory(base::FilePath* pnacl_dir) OVERRIDE;
23 virtual bool GetUserDirectory(base::FilePath* user_dir) OVERRIDE; 32 virtual bool GetUserDirectory(base::FilePath* user_dir) OVERRIDE;
24 virtual std::string GetVersionString() const OVERRIDE; 33 virtual std::string GetVersionString() const OVERRIDE;
25 virtual ppapi::host::HostFactory* CreatePpapiHostFactory( 34 virtual ppapi::host::HostFactory* CreatePpapiHostFactory(
26 content::BrowserPpapiHost* ppapi_host) OVERRIDE; 35 content::BrowserPpapiHost* ppapi_host) OVERRIDE;
27 virtual bool MapUrlToLocalFilePath(const GURL& url, 36 virtual bool MapUrlToLocalFilePath(const GURL& url,
28 bool is_blocking, 37 bool use_blocking_api,
29 base::FilePath* file_path) OVERRIDE; 38 base::FilePath* file_path) OVERRIDE;
30 virtual void SetDebugPatterns(std::string debug_patterns) OVERRIDE; 39 virtual void SetDebugPatterns(std::string debug_patterns) OVERRIDE;
31 virtual bool URLMatchesDebugPatterns(const GURL& manifest_url) OVERRIDE; 40 virtual bool URLMatchesDebugPatterns(const GURL& manifest_url) OVERRIDE;
32 41
33 private: 42 private:
34 scoped_refptr<ExtensionInfoMap> extension_info_map_; 43 DISALLOW_COPY_AND_ASSIGN(TestNaClBrowserDelegate);
35 std::vector<URLPattern> debug_patterns_;
36 bool inverse_debug_patterns_;
37 DISALLOW_COPY_AND_ASSIGN(NaClBrowserDelegateImpl);
38 }; 44 };
39 45
40 46 #endif // COMPONENTS_NACL_COMMON_TEST_NACL_BROWSER_DELEGATE_H_
41 #endif // CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « components/nacl.gyp ('k') | components/nacl/common/test_nacl_browser_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698