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

Unified 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: clang-format Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/nacl/common/test_nacl_browser_delegate.h
diff --git a/components/nacl/common/test_nacl_browser_delegate.h b/components/nacl/common/test_nacl_browser_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..df066dc9907908217a42d52d57f69e9fc10d6c87
--- /dev/null
+++ b/components/nacl/common/test_nacl_browser_delegate.h
@@ -0,0 +1,60 @@
+// Copyright 2013 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 COMPONENTS_NACL_COMMON_TEST_NACL_BROWSER_DELEGATE_H_
+#define COMPONENTS_NACL_COMMON_TEST_NACL_BROWSER_DELEGATE_H_
+
+#include "components/nacl/common/nacl_browser_delegate.h"
+
+// This is a base test implementation of NaClBrowserDelegate, which
Mark Seaborn 2013/10/31 02:36:38 Nit: remove comma, otherwise it looks like you're
jvoung (off chromium) 2013/10/31 16:59:55 Done.
+// 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.
Mark Seaborn 2013/10/31 02:36:38 Indent by 1 more space to match the other SetDeleg
jvoung (off chromium) 2013/10/31 16:59:55 Done.
+class TestNaClBrowserDelegate : public NaClBrowserDelegate {
+ public:
+ virtual ~TestNaClBrowserDelegate() {}
+ virtual void ShowNaClInfobar(int render_process_id,
+ int render_view_id,
+ int error_id) OVERRIDE {}
+ virtual bool DialogsAreSuppressed() OVERRIDE { return false; }
+ virtual bool GetCacheDirectory(base::FilePath* cache_dir) OVERRIDE {
+ return false;
+ }
+ virtual bool GetPluginDirectory(base::FilePath* plugin_dir) OVERRIDE {
+ return false;
+ }
+ virtual bool GetPnaclDirectory(base::FilePath* pnacl_dir) OVERRIDE {
+ return false;
+ }
+ virtual bool GetUserDirectory(base::FilePath* user_dir) OVERRIDE {
+ return false;
+ }
+ virtual std::string GetVersionString() const OVERRIDE {
+ return std::string();
+ }
+ virtual ppapi::host::HostFactory* CreatePpapiHostFactory(
+ content::BrowserPpapiHost* ppapi_host) OVERRIDE {
+ return NULL;
+ }
+ virtual bool MapUrlToLocalFilePath(const GURL& url,
+ bool use_blocking_api,
+ base::FilePath* file_path) OVERRIDE {
+ return false;
+ }
+ virtual void TryInstallPnacl(const base::Callback<void(bool)>& installed)
+ OVERRIDE {
+ installed.Run(false);
+ }
+ virtual void SetDebugPatterns(std::string debug_patterns) OVERRIDE {}
+ virtual bool URLMatchesDebugPatterns(const GURL& manifest_url) OVERRIDE {
+ return false;
+ }
+};
+
+#endif // COMPONENTS_NACL_COMMON_TEST_NACL_BROWSER_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698