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