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

Unified Diff: athena/test/test_app_content_control_delegate_impl.cc

Issue 477523002: Athena: Adding basic resource management framework (un-/re-loading) of V2 applications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Aaaand another rebase. Created 6 years, 4 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
« no previous file with comments | « athena/test/sample_activity.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/test/test_app_content_control_delegate_impl.cc
diff --git a/athena/test/test_app_content_control_delegate_impl.cc b/athena/test/test_app_content_control_delegate_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0cecfecd6e2b8622611ee148377f62ffb26d7462
--- /dev/null
+++ b/athena/test/test_app_content_control_delegate_impl.cc
@@ -0,0 +1,53 @@
+// 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.
+
+#include "athena/content/public/app_content_control_delegate.h"
+
+namespace athena {
+
+class AppContentControlDelegateImpl : public AppContentControlDelegate {
+ public:
+ AppContentControlDelegateImpl() {}
+ virtual ~AppContentControlDelegateImpl() {}
+
+ virtual bool UnloadApplication(
+ const std::string& app_id,
+ content::BrowserContext* browser_context) OVERRIDE;
+ virtual bool RestartApplication(
+ const std::string& app_id,
+ content::BrowserContext* browser_context) OVERRIDE;
+ virtual std::string GetApplicationID(
+ content::WebContents* web_contents) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AppContentControlDelegateImpl);
+};
+
+bool AppContentControlDelegateImpl::UnloadApplication(
+ const std::string& app_id,
+ content::BrowserContext* browser_context) {
+ // TODO(skuhne): Use the extension system to unload
+ // (|ExtensionService::TerminateExtension|) once it becomes available in
+ // Athena.
+ return false;
+}
+
+bool AppContentControlDelegateImpl::RestartApplication(
+ const std::string& app_id,
+ content::BrowserContext* browser_context) {
+ return false;
+}
+
+std::string AppContentControlDelegateImpl::GetApplicationID(
+ content::WebContents* web_contents) {
+ return std::string();
+}
+
+// static
+AppContentControlDelegate*
+AppContentControlDelegate::CreateAppContentControlDelegate() {
+ return new AppContentControlDelegateImpl;
+}
+
+} // namespace athena
« no previous file with comments | « athena/test/sample_activity.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698