OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OPTIONS_HANDLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/display/display_controller.h" | 10 #include "ash/display/display_controller.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 virtual void InitializePage() OVERRIDE; | 31 virtual void InitializePage() OVERRIDE; |
32 | 32 |
33 // WebUIMessageHandler implementation. | 33 // WebUIMessageHandler implementation. |
34 virtual void RegisterMessages() OVERRIDE; | 34 virtual void RegisterMessages() OVERRIDE; |
35 | 35 |
36 // ash::DisplayController::Observer implementation. | 36 // ash::DisplayController::Observer implementation. |
37 virtual void OnDisplayConfigurationChanging() OVERRIDE; | 37 virtual void OnDisplayConfigurationChanging() OVERRIDE; |
38 virtual void OnDisplayConfigurationChanged() OVERRIDE; | 38 virtual void OnDisplayConfigurationChanged() OVERRIDE; |
39 | 39 |
40 private: | 40 private: |
41 // Updates the display section visibility based on the current display | |
42 // configurations. | |
43 void UpdateDisplaySectionVisibility(); | |
44 | |
45 // Sends all of the current display information to the web_ui of options page. | 41 // Sends all of the current display information to the web_ui of options page. |
46 void SendAllDisplayInfo(); | 42 void SendAllDisplayInfo(); |
47 | 43 |
48 // Sends the specified display information to the web_ui of options page. | 44 // Sends the specified display information to the web_ui of options page. |
49 void SendDisplayInfo(const std::vector<const gfx::Display*> displays); | 45 void SendDisplayInfo(const std::vector<const gfx::Display*> displays); |
50 | 46 |
51 // Called when the fade-out animation for mirroring status change is finished. | 47 // Called when the fade-out animation for mirroring status change is finished. |
52 void OnFadeOutForMirroringFinished(bool is_mirroring); | 48 void OnFadeOutForMirroringFinished(bool is_mirroring); |
53 | 49 |
54 // Called when the fade-out animation for secondary display layout change is | 50 // Called when the fade-out animation for secondary display layout change is |
55 // finished. |layout| specifies the four positions of the secondary display | 51 // finished. |layout| specifies the four positions of the secondary display |
56 // (left/right/top/bottom), and |offset| is the offset length from the | 52 // (left/right/top/bottom), and |offset| is the offset length from the |
57 // left/top edge of the primary display. | 53 // left/top edge of the primary display. |
58 void OnFadeOutForDisplayLayoutFinished(int layout, int offset); | 54 void OnFadeOutForDisplayLayoutFinished(int layout, int offset); |
59 | 55 |
60 // Handlers of JS messages. | 56 // Handlers of JS messages. |
61 void HandleDisplayInfo(const base::ListValue* unused_args); | 57 void HandleDisplayInfo(const base::ListValue* unused_args); |
62 void HandleMirroring(const base::ListValue* args); | 58 void HandleMirroring(const base::ListValue* args); |
63 void HandleSetPrimary(const base::ListValue* args); | 59 void HandleSetPrimary(const base::ListValue* args); |
64 void HandleDisplayLayout(const base::ListValue* args); | 60 void HandleDisplayLayout(const base::ListValue* args); |
| 61 void HandleSetUIScale(const base::ListValue* args); |
| 62 void HandleSetOrientation(const base::ListValue* args); |
65 | 63 |
66 DISALLOW_COPY_AND_ASSIGN(DisplayOptionsHandler); | 64 DISALLOW_COPY_AND_ASSIGN(DisplayOptionsHandler); |
67 }; | 65 }; |
68 | 66 |
69 } // namespace options | 67 } // namespace options |
70 } // namespace chromeos | 68 } // namespace chromeos |
71 | 69 |
72 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OPTIONS_HANDLER_H_ | 70 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DISPLAY_OPTIONS_HANDLER_H_ |
OLD | NEW |