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 #include "ui/gfx/screen_win.h" | 5 #include "ui/gfx/screen_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/hash.h" | 9 #include "base/hash.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 void ScreenWin::AddObserver(DisplayObserver* observer) { | 140 void ScreenWin::AddObserver(DisplayObserver* observer) { |
141 // TODO(oshima): crbug.com/122863. | 141 // TODO(oshima): crbug.com/122863. |
142 } | 142 } |
143 | 143 |
144 void ScreenWin::RemoveObserver(DisplayObserver* observer) { | 144 void ScreenWin::RemoveObserver(DisplayObserver* observer) { |
145 // TODO(oshima): crbug.com/122863. | 145 // TODO(oshima): crbug.com/122863. |
146 } | 146 } |
147 | 147 |
148 HWND ScreenWin::GetHWNDFromNativeView(NativeView window) const { | 148 HWND ScreenWin::GetHWNDFromNativeView(NativeView window) const { |
149 #if defined(USE_AURA) | |
150 NOTREACHED(); | 149 NOTREACHED(); |
151 return NULL; | 150 return NULL; |
152 #else | |
153 return window; | |
154 #endif // USE_AURA | |
155 } | 151 } |
156 | 152 |
157 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { | 153 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { |
158 #if defined(USE_AURA) | |
159 NOTREACHED(); | 154 NOTREACHED(); |
160 return NULL; | 155 return NULL; |
161 #else | |
162 return hwnd; | |
163 #endif // USE_AURA | |
164 } | 156 } |
165 | 157 |
166 #if !defined(USE_AURA) | |
167 Screen* CreateNativeScreen() { | |
168 return new ScreenWin; | |
169 } | |
170 #endif // !USE_AURA | |
171 | |
172 } // namespace gfx | 158 } // namespace gfx |
OLD | NEW |