| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chrome/browser/ui/webui/options/options_ui.h" | 10 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 11 #include "components/arc/storage_manager/arc_storage_manager.h" | 11 #include "components/arc/storage_manager/arc_storage_manager.h" |
| 12 | 12 |
| 13 namespace chromeos { | 13 namespace chromeos { |
| 14 namespace options { | 14 namespace options { |
| 15 | 15 |
| 16 // Storage manager overlay page UI handler. | 16 // Storage manager overlay page UI handler. |
| 17 class StorageManagerHandler : public ::options::OptionsPageUIHandler { | 17 class StorageManagerHandler : public ::options::OptionsPageUIHandler { |
| 18 public: | 18 public: |
| 19 // Enumeration for device state about remaining space. These values must be |
| 20 // kept in sync with options.StorageSpaceState in JS code. |
| 21 enum StorageSpaceState { |
| 22 STORAGE_SPACE_NORMAL = 0, |
| 23 STORAGE_SPACE_LOW = 1, |
| 24 STORAGE_SPACE_CRITICALLY_LOW = 2, |
| 25 }; |
| 26 |
| 19 StorageManagerHandler(); | 27 StorageManagerHandler(); |
| 20 ~StorageManagerHandler() override; | 28 ~StorageManagerHandler() override; |
| 21 | 29 |
| 22 // OptionsPageUIHandler implementation. | 30 // OptionsPageUIHandler implementation. |
| 23 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; | 31 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; |
| 24 void InitializePage() override; | 32 void InitializePage() override; |
| 25 | 33 |
| 26 // WebUIMessageHandler implementation. | 34 // WebUIMessageHandler implementation. |
| 27 void RegisterMessages() override; | 35 void RegisterMessages() override; |
| 28 | 36 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 70 |
| 63 base::WeakPtrFactory<StorageManagerHandler> weak_ptr_factory_; | 71 base::WeakPtrFactory<StorageManagerHandler> weak_ptr_factory_; |
| 64 | 72 |
| 65 DISALLOW_COPY_AND_ASSIGN(StorageManagerHandler); | 73 DISALLOW_COPY_AND_ASSIGN(StorageManagerHandler); |
| 66 }; | 74 }; |
| 67 | 75 |
| 68 } // namespace options | 76 } // namespace options |
| 69 } // namespace chromeos | 77 } // namespace chromeos |
| 70 | 78 |
| 71 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_ | 79 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_ |
| OLD | NEW |