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 #include "athena/content/public/app_content_control_delegate.h" |
| 6 |
| 7 namespace athena { |
| 8 |
| 9 class AppContentControlDelegateImpl : public AppContentControlDelegate { |
| 10 public: |
| 11 AppContentControlDelegateImpl() {} |
| 12 virtual ~AppContentControlDelegateImpl() {} |
| 13 |
| 14 virtual bool UnloadApplication( |
| 15 const std::string& app_id, |
| 16 content::BrowserContext* browser_context) OVERRIDE; |
| 17 virtual bool RestartApplication( |
| 18 const std::string& app_id, |
| 19 content::BrowserContext* browser_context) OVERRIDE; |
| 20 virtual std::string GetApplicationID( |
| 21 content::WebContents* web_contents) OVERRIDE; |
| 22 |
| 23 private: |
| 24 DISALLOW_COPY_AND_ASSIGN(AppContentControlDelegateImpl); |
| 25 }; |
| 26 |
| 27 bool AppContentControlDelegateImpl::UnloadApplication( |
| 28 const std::string& app_id, |
| 29 content::BrowserContext* browser_context) { |
| 30 // TODO(skuhne): Use the extension system to unload |
| 31 // (|ExtensionService::TerminateExtension|) once it becomes available in |
| 32 // Athena. |
| 33 return false; |
| 34 } |
| 35 |
| 36 bool AppContentControlDelegateImpl::RestartApplication( |
| 37 const std::string& app_id, |
| 38 content::BrowserContext* browser_context) { |
| 39 return false; |
| 40 } |
| 41 |
| 42 std::string AppContentControlDelegateImpl::GetApplicationID( |
| 43 content::WebContents* web_contents) { |
| 44 return std::string(); |
| 45 } |
| 46 |
| 47 // static |
| 48 AppContentControlDelegate* |
| 49 AppContentControlDelegate::CreateAppContentControlDelegate() { |
| 50 return new AppContentControlDelegateImpl; |
| 51 } |
| 52 |
| 53 } // namespace athena |
OLD | NEW |