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, title)); | |
sky
2014/06/25 16:24:44
Callers that care about the title can ask for it.
Nina
2014/06/25 19:54:40
Done. I was following the same logic as OnWindowPa
| |
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 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1432 return window; | 1439 return window; |
1433 if (offset) | 1440 if (offset) |
1434 *offset += window->bounds().OffsetFromOrigin(); | 1441 *offset += window->bounds().OffsetFromOrigin(); |
1435 } | 1442 } |
1436 if (offset) | 1443 if (offset) |
1437 *offset = gfx::Vector2d(); | 1444 *offset = gfx::Vector2d(); |
1438 return NULL; | 1445 return NULL; |
1439 } | 1446 } |
1440 | 1447 |
1441 } // namespace aura | 1448 } // namespace aura |
OLD | NEW |