| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/widget/native_widget_win.h" | 5 #include "views/widget/native_widget_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/system_monitor/system_monitor.h" | 10 #include "base/system_monitor/system_monitor.h" |
| (...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 gfx::Size s(std::max(0, static_cast<int>(r.right - r.left)), | 1139 gfx::Size s(std::max(0, static_cast<int>(r.right - r.left)), |
| 1140 std::max(0, static_cast<int>(r.bottom - r.top))); | 1140 std::max(0, static_cast<int>(r.bottom - r.top))); |
| 1141 delegate_->OnSizeChanged(s); | 1141 delegate_->OnSizeChanged(s); |
| 1142 if (use_layered_buffer_) { | 1142 if (use_layered_buffer_) { |
| 1143 layered_window_contents_.reset( | 1143 layered_window_contents_.reset( |
| 1144 new gfx::CanvasSkia(s.width(), s.height(), false)); | 1144 new gfx::CanvasSkia(s.width(), s.height(), false)); |
| 1145 } | 1145 } |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 gfx::AcceleratedWidget NativeWidgetWin::GetAcceleratedWidget() { | 1148 gfx::AcceleratedWidget NativeWidgetWin::GetAcceleratedWidget() { |
| 1149 // TODO(sky): | 1149 #if defined(VIEWS_COMPOSITOR) |
| 1150 return gfx::kNullAcceleratedWidget; | 1150 return gfx::kNullAcceleratedWidget; |
| 1151 #else |
| 1152 return hwnd(); |
| 1153 #endif |
| 1151 } | 1154 } |
| 1152 | 1155 |
| 1153 void NativeWidgetWin::DispatchKeyEventPostIME(const KeyEvent& key) { | 1156 void NativeWidgetWin::DispatchKeyEventPostIME(const KeyEvent& key) { |
| 1154 SetMsgHandled(delegate_->OnKeyEvent(key)); | 1157 SetMsgHandled(delegate_->OnKeyEvent(key)); |
| 1155 } | 1158 } |
| 1156 | 1159 |
| 1157 //////////////////////////////////////////////////////////////////////////////// | 1160 //////////////////////////////////////////////////////////////////////////////// |
| 1158 // Widget, public: | 1161 // Widget, public: |
| 1159 | 1162 |
| 1160 // static | 1163 // static |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 | 1296 |
| 1294 // And now, notify them that they have a brand new parent. | 1297 // And now, notify them that they have a brand new parent. |
| 1295 for (NativeWidgets::iterator it = widgets.begin(); | 1298 for (NativeWidgets::iterator it = widgets.begin(); |
| 1296 it != widgets.end(); ++it) { | 1299 it != widgets.end(); ++it) { |
| 1297 (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(true, | 1300 (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(true, |
| 1298 new_parent); | 1301 new_parent); |
| 1299 } | 1302 } |
| 1300 } | 1303 } |
| 1301 | 1304 |
| 1302 } // namespace views | 1305 } // namespace views |
| OLD | NEW |