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 "ui/aura/root_window.h" | 5 #include "ui/aura/root_window.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 493 |
494 void RootWindow::OnLayerAnimationAborted( | 494 void RootWindow::OnLayerAnimationAborted( |
495 const ui::LayerAnimationSequence* animation) { | 495 const ui::LayerAnimationSequence* animation) { |
496 } | 496 } |
497 | 497 |
498 void RootWindow::SetFocusedWindow(Window* focused_window) { | 498 void RootWindow::SetFocusedWindow(Window* focused_window) { |
499 if (focused_window == focused_window_) | 499 if (focused_window == focused_window_) |
500 return; | 500 return; |
501 if (focused_window && !focused_window->CanFocus()) | 501 if (focused_window && !focused_window->CanFocus()) |
502 return; | 502 return; |
503 // The NULL-check of |focused)window| is essential here before asking the | 503 // The NULL-check of |focused_window| is essential here before asking the |
504 // activation client, since it is valid to clear the focus by calling | 504 // activation client, since it is valid to clear the focus by calling |
505 // SetFocusedWindow() to NULL. | 505 // SetFocusedWindow() to NULL. |
506 if (focused_window && client::GetActivationClient() && | 506 if (focused_window && client::GetActivationClient() && |
507 !client::GetActivationClient()->CanFocusWindow(focused_window)) { | 507 !client::GetActivationClient()->CanFocusWindow(focused_window)) { |
508 return; | 508 return; |
509 } | 509 } |
510 | 510 |
511 if (focused_window_ && focused_window_->delegate()) | 511 if (focused_window_ && focused_window_->delegate()) |
512 focused_window_->delegate()->OnBlur(); | 512 focused_window_->delegate()->OnBlur(); |
513 focused_window_ = focused_window; | 513 focused_window_ = focused_window; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { | 548 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { |
549 bounds.set_size(gfx::Size(parsed_width, parsed_height)); | 549 bounds.set_size(gfx::Size(parsed_width, parsed_height)); |
550 } else if (use_fullscreen_host_window_) { | 550 } else if (use_fullscreen_host_window_) { |
551 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize()); | 551 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize()); |
552 } | 552 } |
553 | 553 |
554 return bounds; | 554 return bounds; |
555 } | 555 } |
556 | 556 |
557 } // namespace aura | 557 } // namespace aura |
OLD | NEW |