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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 467 |
468 void RootWindow::OnLayerAnimationAborted( | 468 void RootWindow::OnLayerAnimationAborted( |
469 const ui::LayerAnimationSequence* animation) { | 469 const ui::LayerAnimationSequence* animation) { |
470 } | 470 } |
471 | 471 |
472 void RootWindow::SetFocusedWindow(Window* focused_window) { | 472 void RootWindow::SetFocusedWindow(Window* focused_window) { |
473 if (focused_window == focused_window_) | 473 if (focused_window == focused_window_) |
474 return; | 474 return; |
475 if (focused_window && !focused_window->CanFocus()) | 475 if (focused_window && !focused_window->CanFocus()) |
476 return; | 476 return; |
477 // The NULL-check of |focused)window| is essential here before asking the | 477 // The NULL-check of |focused_window| is essential here before asking the |
478 // activation client, since it is valid to clear the focus by calling | 478 // activation client, since it is valid to clear the focus by calling |
479 // SetFocusedWindow() to NULL. | 479 // SetFocusedWindow() to NULL. |
480 if (focused_window && ActivationClient::GetActivationClient() && | 480 if (focused_window && ActivationClient::GetActivationClient() && |
481 !ActivationClient::GetActivationClient()->CanFocusWindow( | 481 !ActivationClient::GetActivationClient()->CanFocusWindow( |
482 focused_window)) { | 482 focused_window)) { |
483 return; | 483 return; |
484 } | 484 } |
485 | 485 |
486 if (focused_window_ && focused_window_->delegate()) | 486 if (focused_window_ && focused_window_->delegate()) |
487 focused_window_->delegate()->OnBlur(); | 487 focused_window_->delegate()->OnBlur(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { | 523 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { |
524 bounds.set_size(gfx::Size(parsed_width, parsed_height)); | 524 bounds.set_size(gfx::Size(parsed_width, parsed_height)); |
525 } else if (use_fullscreen_host_window_) { | 525 } else if (use_fullscreen_host_window_) { |
526 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize()); | 526 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize()); |
527 } | 527 } |
528 | 528 |
529 return bounds; | 529 return bounds; |
530 } | 530 } |
531 | 531 |
532 } // namespace aura | 532 } // namespace aura |
OLD | NEW |