| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ui/ozone/common/native_display_delegate_ozone.h" | 5 #include "ui/ozone/common/native_display_delegate_ozone.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/ozone/common/display_snapshot_proxy.h" | 8 #include "ui/ozone/common/display_snapshot_proxy.h" |
| 9 #include "ui/ozone/common/display_util.h" | 9 #include "ui/ozone/common/display_util.h" |
| 10 | 10 |
| 11 namespace ui { | 11 namespace ui { |
| 12 | 12 |
| 13 NativeDisplayDelegateOzone::NativeDisplayDelegateOzone() { | 13 NativeDisplayDelegateOzone::NativeDisplayDelegateOzone() { |
| 14 } | 14 } |
| 15 | 15 |
| 16 NativeDisplayDelegateOzone::~NativeDisplayDelegateOzone() { | 16 NativeDisplayDelegateOzone::~NativeDisplayDelegateOzone() { |
| 17 } | 17 } |
| 18 | 18 |
| 19 void NativeDisplayDelegateOzone::Initialize() { | 19 void NativeDisplayDelegateOzone::Initialize() { |
| 20 DisplaySnapshot_Params params; | 20 DisplaySnapshot_Params params; |
| 21 if (CreateSnapshotFromCommandLine(¶ms)) { | 21 if (CreateSnapshotFromCommandLine(¶ms)) { |
| 22 DCHECK_NE(DISPLAY_CONNECTION_TYPE_NONE, params.type); | 22 DCHECK_NE(DISPLAY_CONNECTION_TYPE_NONE, params.type); |
| 23 displays_.push_back(new DisplaySnapshotProxy(params)); | 23 displays_.push_back(make_scoped_ptr(new DisplaySnapshotProxy(params))); |
| 24 } | 24 } |
| 25 } | 25 } |
| 26 | 26 |
| 27 void NativeDisplayDelegateOzone::GrabServer() { | 27 void NativeDisplayDelegateOzone::GrabServer() { |
| 28 NOTIMPLEMENTED(); | 28 NOTIMPLEMENTED(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void NativeDisplayDelegateOzone::UngrabServer() { | 31 void NativeDisplayDelegateOzone::UngrabServer() { |
| 32 NOTIMPLEMENTED(); | 32 NOTIMPLEMENTED(); |
| 33 } | 33 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 51 void NativeDisplayDelegateOzone::SetBackgroundColor(uint32_t color_argb) { | 51 void NativeDisplayDelegateOzone::SetBackgroundColor(uint32_t color_argb) { |
| 52 NOTIMPLEMENTED(); | 52 NOTIMPLEMENTED(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void NativeDisplayDelegateOzone::ForceDPMSOn() { | 55 void NativeDisplayDelegateOzone::ForceDPMSOn() { |
| 56 NOTIMPLEMENTED(); | 56 NOTIMPLEMENTED(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void NativeDisplayDelegateOzone::GetDisplays( | 59 void NativeDisplayDelegateOzone::GetDisplays( |
| 60 const GetDisplaysCallback& callback) { | 60 const GetDisplaysCallback& callback) { |
| 61 callback.Run(displays_.get()); | 61 std::vector<DisplaySnapshot*> displays; |
| 62 for (const auto& display : displays_) |
| 63 displays.push_back(display.get()); |
| 64 callback.Run(displays); |
| 62 } | 65 } |
| 63 | 66 |
| 64 void NativeDisplayDelegateOzone::AddMode(const ui::DisplaySnapshot& output, | 67 void NativeDisplayDelegateOzone::AddMode(const ui::DisplaySnapshot& output, |
| 65 const ui::DisplayMode* mode) { | 68 const ui::DisplayMode* mode) { |
| 66 NOTIMPLEMENTED(); | 69 NOTIMPLEMENTED(); |
| 67 } | 70 } |
| 68 | 71 |
| 69 void NativeDisplayDelegateOzone::Configure(const ui::DisplaySnapshot& output, | 72 void NativeDisplayDelegateOzone::Configure(const ui::DisplaySnapshot& output, |
| 70 const ui::DisplayMode* mode, | 73 const ui::DisplayMode* mode, |
| 71 const gfx::Point& origin, | 74 const gfx::Point& origin, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void NativeDisplayDelegateOzone::AddObserver(NativeDisplayObserver* observer) { | 120 void NativeDisplayDelegateOzone::AddObserver(NativeDisplayObserver* observer) { |
| 118 NOTIMPLEMENTED(); | 121 NOTIMPLEMENTED(); |
| 119 } | 122 } |
| 120 | 123 |
| 121 void NativeDisplayDelegateOzone::RemoveObserver( | 124 void NativeDisplayDelegateOzone::RemoveObserver( |
| 122 NativeDisplayObserver* observer) { | 125 NativeDisplayObserver* observer) { |
| 123 NOTIMPLEMENTED(); | 126 NOTIMPLEMENTED(); |
| 124 } | 127 } |
| 125 | 128 |
| 126 } // namespace ui | 129 } // namespace ui |
| OLD | NEW |