OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ATHENA_CONTENT_PUBLIC_APP_CONTENT_CONTROL_DLEGATE_H_ |
| 6 #define ATHENA_CONTENT_PUBLIC_APP_CONTENT_CONTROL_DLEGATE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 |
| 12 namespace content { |
| 13 class BrowserContext; |
| 14 class WebContents; |
| 15 } |
| 16 |
| 17 namespace athena { |
| 18 |
| 19 // The application content delegate which can be overwritten for unit tests to |
| 20 // eliminate dependencies to the content / browser system. |
| 21 class AppContentControlDelegate { |
| 22 public: |
| 23 static AppContentControlDelegate* CreateAppContentControlDelegate(); |
| 24 |
| 25 AppContentControlDelegate() {} |
| 26 virtual ~AppContentControlDelegate() {} |
| 27 |
| 28 // Unload an application. Returns true when unloaded. |
| 29 virtual bool UnloadApplication(const std::string& app_id, |
| 30 content::BrowserContext* browser_context) = 0; |
| 31 // Restarts an application. Returns true when the restart was initiated. |
| 32 virtual bool RestartApplication(const std::string& app_id, |
| 33 content::BrowserContext* browser_context) = 0; |
| 34 // Returns the application ID (or an empty string) for a given web content. |
| 35 virtual std::string GetApplicationID(content::WebContents* web_contents) = 0; |
| 36 }; |
| 37 |
| 38 } // namespace athena |
| 39 |
| 40 #endif // ATHENA_CONTENT_PUBLIC_APP_CONTENT_CONTROL_DLEGATE_H_ |
OLD | NEW |