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_DLEGATE_H_ | |
6 #define ATHENA_CONTENT_PUBLIC_APP_CONTENT_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 / brwoser system. | |
21 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.
| |
22 public: | |
23 AppContentDelegate() {} | |
24 virtual ~AppContentDelegate() {} | |
25 | |
26 // Unload an application. Returns true when unloaded. | |
27 virtual bool UnloadApplication(const std::string& app_id, | |
28 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.
| |
29 // Restarts an application. Returns true when the restart was initiated. | |
30 virtual bool RestartApplication(const std::string& app_id, | |
31 content::BrowserContext* browser_context); | |
32 // Returns the application ID (or an empty string) for a given web content. | |
33 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.
| |
34 | |
35 private: | |
36 DISALLOW_COPY_AND_ASSIGN(AppContentDelegate); | |
37 }; | |
38 | |
39 } // namespace athena | |
40 | |
41 #endif // ATHENA_CONTENT_PUBLIC_APP_CONTENT_DLEGATE_H_ | |
OLD | NEW |