Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(954)

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/display_options_handler.h

Issue 10544171: Add OptionsUI and its handler for multiple displays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_DISPLAY_OPTIONS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_DISPLAY_OPTIONS_HANDLER_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "chrome/browser/ui/webui/options2/options_ui2.h"
12 #include "ui/aura/display_observer.h"
13
14 namespace base {
15 class ListValue;
16 }
17
18 namespace chromeos {
19 namespace options2 {
20
21 // Display options overlay page UI handler.
22 class DisplayOptionsHandler : public ::options2::OptionsPageUIHandler,
23 public aura::DisplayObserver {
24 public:
25 DisplayOptionsHandler();
26 virtual ~DisplayOptionsHandler();
27
28 // OptionsPageUIHandler implementation.
29 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
30 virtual void InitializeHandler() OVERRIDE;
31
32 // WebUIMessageHandler implementation.
33 virtual void RegisterMessages() OVERRIDE;
34
35 // aura::DisplayObserver implementation.
36 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
37 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
38 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
39
40 private:
41 // Updates the display section visibility based on the current display
42 // configurations.
43 void UpdateDisplaySectionVisibility();
44
45 // Sends the current display information to the web_ui of options page.
46 void SendDisplayInfo();
47
48 // Handlers of JS messages.
49 void HandleDisplayInfo(const base::ListValue* unused_args);
50 void HandleMirroring(const base::ListValue* args);
51 void HandleDisplayLayout(const base::ListValue* args);
52
53 DISALLOW_COPY_AND_ASSIGN(DisplayOptionsHandler);
54 };
55
56 } // namespace options2
57 } // namespace chromeos
58
59 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_DISPLAY_OPTIONS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698