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/views/widget/desktop_aura/desktop_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 return; | 1150 return; |
1151 | 1151 |
1152 gfx::Rect new_bounds = gfx::Rect(host->window()->bounds().size()); | 1152 gfx::Rect new_bounds = gfx::Rect(host->window()->bounds().size()); |
1153 content_window_->SetBounds(new_bounds); | 1153 content_window_->SetBounds(new_bounds); |
1154 // Can be NULL at start. | 1154 // Can be NULL at start. |
1155 if (content_window_container_) | 1155 if (content_window_container_) |
1156 content_window_container_->SetBounds(new_bounds); | 1156 content_window_container_->SetBounds(new_bounds); |
1157 native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); | 1157 native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); |
1158 } | 1158 } |
1159 | 1159 |
| 1160 void DesktopNativeWidgetAura::OnHostWorkspaceChanged( |
| 1161 const aura::WindowTreeHost* host, |
| 1162 int workspace_id) { |
| 1163 native_widget_delegate_->OnNativeWidgetWorkspaceChanged(workspace_id); |
| 1164 } |
| 1165 |
1160 void DesktopNativeWidgetAura::OnHostMoved(const aura::WindowTreeHost* host, | 1166 void DesktopNativeWidgetAura::OnHostMoved(const aura::WindowTreeHost* host, |
1161 const gfx::Point& new_origin) { | 1167 const gfx::Point& new_origin) { |
1162 TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnHostMoved", | 1168 TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnHostMoved", |
1163 "new_origin", new_origin.ToString()); | 1169 "new_origin", new_origin.ToString()); |
1164 | 1170 |
1165 native_widget_delegate_->OnNativeWidgetMove(); | 1171 native_widget_delegate_->OnNativeWidgetMove(); |
1166 } | 1172 } |
1167 | 1173 |
1168 //////////////////////////////////////////////////////////////////////////////// | 1174 //////////////////////////////////////////////////////////////////////////////// |
1169 // DesktopNativeWidgetAura, private: | 1175 // DesktopNativeWidgetAura, private: |
(...skipping 12 matching lines...) Expand all Loading... |
1182 if (cursor_reference_count_ == 0) { | 1188 if (cursor_reference_count_ == 0) { |
1183 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1189 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
1184 // for cleaning up |cursor_manager_|. | 1190 // for cleaning up |cursor_manager_|. |
1185 delete cursor_manager_; | 1191 delete cursor_manager_; |
1186 native_cursor_manager_ = NULL; | 1192 native_cursor_manager_ = NULL; |
1187 cursor_manager_ = NULL; | 1193 cursor_manager_ = NULL; |
1188 } | 1194 } |
1189 } | 1195 } |
1190 | 1196 |
1191 } // namespace views | 1197 } // namespace views |
OLD | NEW |