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/aura/window.h" | 5 #include "ui/aura/window.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 private: | 208 private: |
209 Window* window_; | 209 Window* window_; |
210 bool hid_cursor_; | 210 bool hid_cursor_; |
211 | 211 |
212 DISALLOW_COPY_AND_ASSIGN(ScopedCursorHider); | 212 DISALLOW_COPY_AND_ASSIGN(ScopedCursorHider); |
213 }; | 213 }; |
214 | 214 |
215 Window::Window(WindowDelegate* delegate) | 215 Window::Window(WindowDelegate* delegate) |
216 : dispatcher_(NULL), | 216 : dispatcher_(NULL), |
217 type_(client::WINDOW_TYPE_UNKNOWN), | 217 type_(ui::wm::WINDOW_TYPE_UNKNOWN), |
218 owned_by_parent_(true), | 218 owned_by_parent_(true), |
219 delegate_(delegate), | 219 delegate_(delegate), |
220 parent_(NULL), | 220 parent_(NULL), |
221 transient_parent_(NULL), | 221 transient_parent_(NULL), |
222 visible_(false), | 222 visible_(false), |
223 id_(-1), | 223 id_(-1), |
224 transparent_(false), | 224 transparent_(false), |
225 user_data_(NULL), | 225 user_data_(NULL), |
226 ignore_events_(false), | 226 ignore_events_(false), |
227 // Don't notify newly added observers during notification. This causes | 227 // Don't notify newly added observers during notification. This causes |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 std::vector<ui::Layer*> children_copy = old_layer->children(); | 341 std::vector<ui::Layer*> children_copy = old_layer->children(); |
342 for (std::vector<ui::Layer*>::const_iterator it = children_copy.begin(); | 342 for (std::vector<ui::Layer*>::const_iterator it = children_copy.begin(); |
343 it != children_copy.end(); | 343 it != children_copy.end(); |
344 ++it) { | 344 ++it) { |
345 ui::Layer* child = *it; | 345 ui::Layer* child = *it; |
346 layer_->Add(child); | 346 layer_->Add(child); |
347 } | 347 } |
348 return old_layer; | 348 return old_layer; |
349 } | 349 } |
350 | 350 |
351 void Window::SetType(client::WindowType type) { | 351 void Window::SetType(ui::wm::WindowType type) { |
352 // Cannot change type after the window is initialized. | 352 // Cannot change type after the window is initialized. |
353 DCHECK(!layer_); | 353 DCHECK(!layer_); |
354 type_ = type; | 354 type_ = type; |
355 } | 355 } |
356 | 356 |
357 void Window::SetName(const std::string& name) { | 357 void Window::SetName(const std::string& name) { |
358 name_ = name; | 358 name_ = name; |
359 | 359 |
360 if (layer_) | 360 if (layer_) |
361 UpdateLayerName(name_); | 361 UpdateLayerName(name_); |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1558 return window; | 1558 return window; |
1559 if (offset) | 1559 if (offset) |
1560 *offset += window->bounds().OffsetFromOrigin(); | 1560 *offset += window->bounds().OffsetFromOrigin(); |
1561 } | 1561 } |
1562 if (offset) | 1562 if (offset) |
1563 *offset = gfx::Vector2d(); | 1563 *offset = gfx::Vector2d(); |
1564 return NULL; | 1564 return NULL; |
1565 } | 1565 } |
1566 | 1566 |
1567 } // namespace aura | 1567 } // namespace aura |
OLD | NEW |