| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_DISPLAY_OVERSCAN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OVERSCAN_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OVERSCAN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OVERSCAN_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "chrome/browser/ui/webui/options/options_ui.h" | 13 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 14 #include "ui/gfx/display_observer.h" | 14 #include "ui/display/display_observer.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class DictionaryValue; | 17 class DictionaryValue; |
| 18 class ListValue; | 18 class ListValue; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace chromeos { | 21 namespace chromeos { |
| 22 class OverscanCalibrator; | 22 class OverscanCalibrator; |
| 23 | 23 |
| 24 namespace options { | 24 namespace options { |
| 25 | 25 |
| 26 // Display options overlay page UI handler. | 26 // Display options overlay page UI handler. |
| 27 class DisplayOverscanHandler : public ::options::OptionsPageUIHandler, | 27 class DisplayOverscanHandler : public ::options::OptionsPageUIHandler, |
| 28 public gfx::DisplayObserver { | 28 public display::DisplayObserver { |
| 29 public: | 29 public: |
| 30 DisplayOverscanHandler(); | 30 DisplayOverscanHandler(); |
| 31 ~DisplayOverscanHandler() override; | 31 ~DisplayOverscanHandler() override; |
| 32 | 32 |
| 33 // OptionsPageUIHandler implementation. | 33 // OptionsPageUIHandler implementation. |
| 34 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; | 34 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; |
| 35 | 35 |
| 36 // WebUIMessageHandler implementation. | 36 // WebUIMessageHandler implementation. |
| 37 void RegisterMessages() override; | 37 void RegisterMessages() override; |
| 38 | 38 |
| 39 // gfx::DisplayObserver implementation. | 39 // display::DisplayObserver implementation. |
| 40 void OnDisplayAdded(const gfx::Display& new_display) override; | 40 void OnDisplayAdded(const display::Display& new_display) override; |
| 41 void OnDisplayRemoved(const gfx::Display& old_display) override; | 41 void OnDisplayRemoved(const display::Display& old_display) override; |
| 42 void OnDisplayMetricsChanged(const gfx::Display& display, | 42 void OnDisplayMetricsChanged(const display::Display& display, |
| 43 uint32_t metrics) override; | 43 uint32_t metrics) override; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 // Handlers of JS messages. | 46 // Handlers of JS messages. |
| 47 void HandleStart(const base::ListValue* args); | 47 void HandleStart(const base::ListValue* args); |
| 48 void HandleCommit(const base::ListValue* unused_args); | 48 void HandleCommit(const base::ListValue* unused_args); |
| 49 void HandleReset(const base::ListValue* unused_args); | 49 void HandleReset(const base::ListValue* unused_args); |
| 50 void HandleCancel(const base::ListValue* unused_args); | 50 void HandleCancel(const base::ListValue* unused_args); |
| 51 void HandleMove(const base::ListValue* args); | 51 void HandleMove(const base::ListValue* args); |
| 52 void HandleResize(const base::ListValue* args); | 52 void HandleResize(const base::ListValue* args); |
| 53 | 53 |
| 54 std::unique_ptr<OverscanCalibrator> overscan_calibrator_; | 54 std::unique_ptr<OverscanCalibrator> overscan_calibrator_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(DisplayOverscanHandler); | 56 DISALLOW_COPY_AND_ASSIGN(DisplayOverscanHandler); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace options | 59 } // namespace options |
| 60 } // namespace chromeos | 60 } // namespace chromeos |
| 61 | 61 |
| 62 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OVERSCAN_HANDLER_H_ | 62 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OVERSCAN_HANDLER_H_ |
| OLD | NEW |