Chromium Code Reviews| Index: athena/content/public/app_content_delegate.h |
| diff --git a/athena/content/public/app_content_delegate.h b/athena/content/public/app_content_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..13ab6e6bebd4e00f8e1553a49447698fb02ef54e |
| --- /dev/null |
| +++ b/athena/content/public/app_content_delegate.h |
| @@ -0,0 +1,41 @@ |
| +// 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 ATHENA_CONTENT_PUBLIC_APP_CONTENT_DLEGATE_H_ |
| +#define ATHENA_CONTENT_PUBLIC_APP_CONTENT_DLEGATE_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/macros.h" |
| + |
| +namespace content { |
| +class BrowserContext; |
| +class WebContents; |
| +} |
| + |
| +namespace athena { |
| + |
| +// The application content delegate which can be overwritten for unit tests to |
| +// eliminate dependencies to the content / brwoser system. |
| +class AppContentDelegate { |
|
oshima
2014/08/18 23:14:02
AppControlDelegate ? (just an idea. you may ignore
Mr4D (OOO till 08-26)
2014/08/19 14:21:10
Done.
|
| + public: |
| + AppContentDelegate() {} |
| + virtual ~AppContentDelegate() {} |
| + |
| + // Unload an application. Returns true when unloaded. |
| + virtual bool UnloadApplication(const std::string& app_id, |
| + content::BrowserContext* browser_context); |
|
oshima
2014/08/18 23:14:02
pure virtual?
Mr4D (OOO till 08-26)
2014/08/19 14:21:10
Done.
|
| + // Restarts an application. Returns true when the restart was initiated. |
| + virtual bool RestartApplication(const std::string& app_id, |
| + content::BrowserContext* browser_context); |
| + // Returns the application ID (or an empty string) for a given web content. |
| + virtual std::string GetExtensionID(content::WebContents* web_contents); |
|
oshima
2014/08/18 23:14:02
Probably not your fault, but comment and the metho
Mr4D (OOO till 08-26)
2014/08/19 14:21:10
Done.
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(AppContentDelegate); |
| +}; |
| + |
| +} // namespace athena |
| + |
| +#endif // ATHENA_CONTENT_PUBLIC_APP_CONTENT_DLEGATE_H_ |