| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 type_ = type; | 298 type_ = type; |
| 299 } | 299 } |
| 300 | 300 |
| 301 void Window::SetName(const std::string& name) { | 301 void Window::SetName(const std::string& name) { |
| 302 name_ = name; | 302 name_ = name; |
| 303 | 303 |
| 304 if (layer()) | 304 if (layer()) |
| 305 UpdateLayerName(); | 305 UpdateLayerName(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void Window::SetTitle(const base::string16& title) { |
| 309 title_ = title; |
| 310 FOR_EACH_OBSERVER(WindowObserver, |
| 311 observers_, |
| 312 OnWindowTitleChanged(this)); |
| 313 } |
| 314 |
| 308 void Window::SetTransparent(bool transparent) { | 315 void Window::SetTransparent(bool transparent) { |
| 309 transparent_ = transparent; | 316 transparent_ = transparent; |
| 310 if (layer()) | 317 if (layer()) |
| 311 layer()->SetFillsBoundsOpaquely(!transparent_); | 318 layer()->SetFillsBoundsOpaquely(!transparent_); |
| 312 } | 319 } |
| 313 | 320 |
| 314 void Window::SetFillsBoundsCompletely(bool fills_bounds) { | 321 void Window::SetFillsBoundsCompletely(bool fills_bounds) { |
| 315 if (layer()) | 322 if (layer()) |
| 316 layer()->SetFillsBoundsCompletely(fills_bounds); | 323 layer()->SetFillsBoundsCompletely(fills_bounds); |
| 317 } | 324 } |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1438 return window; | 1445 return window; |
| 1439 if (offset) | 1446 if (offset) |
| 1440 *offset += window->bounds().OffsetFromOrigin(); | 1447 *offset += window->bounds().OffsetFromOrigin(); |
| 1441 } | 1448 } |
| 1442 if (offset) | 1449 if (offset) |
| 1443 *offset = gfx::Vector2d(); | 1450 *offset = gfx::Vector2d(); |
| 1444 return NULL; | 1451 return NULL; |
| 1445 } | 1452 } |
| 1446 | 1453 |
| 1447 } // namespace aura | 1454 } // namespace aura |
| OLD | NEW |