| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_DELEGATE_H | 5 #ifndef EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_DELEGATE_H |
| 6 #define EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_DELEGATE_H | 6 #define EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_DELEGATE_H |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/version.h" | 9 #include "base/version.h" |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual bool GetPlatformInfo(api::runtime::PlatformInfo* info) = 0; | 68 virtual bool GetPlatformInfo(api::runtime::PlatformInfo* info) = 0; |
| 69 | 69 |
| 70 // Request a restart of the host device. Returns false iff the device | 70 // Request a restart of the host device. Returns false iff the device |
| 71 // will not be restarted. | 71 // will not be restarted. |
| 72 virtual bool RestartDevice(std::string* error_message) = 0; | 72 virtual bool RestartDevice(std::string* error_message) = 0; |
| 73 | 73 |
| 74 // Open |extension|'s options page, if it has one. Returns true if an | 74 // Open |extension|'s options page, if it has one. Returns true if an |
| 75 // options page was opened, false otherwise. See the docs of the | 75 // options page was opened, false otherwise. See the docs of the |
| 76 // chrome.runtime.openOptionsPage function for the gritty details. | 76 // chrome.runtime.openOptionsPage function for the gritty details. |
| 77 virtual bool OpenOptionsPage(const Extension* extension); | 77 virtual bool OpenOptionsPage(const Extension* extension); |
| 78 |
| 79 // Sets the callback that will be invoked when the host device is being |
| 80 // shutdown or restarted. |
| 81 virtual void SetOnDeviceShutdownCallback(const base::Closure& callback) = 0; |
| 78 }; | 82 }; |
| 79 | 83 |
| 80 } // namespace extensions | 84 } // namespace extensions |
| 81 | 85 |
| 82 #endif // EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_DELEGATE_H | 86 #endif // EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_DELEGATE_H |
| OLD | NEW |