| 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" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/string_number_conversions.h" | 14 #include "base/string_number_conversions.h" |
| 15 #include "base/string_split.h" | 15 #include "base/string_split.h" |
| 16 #include "ui/aura/aura_switches.h" | 16 #include "ui/aura/aura_switches.h" |
| 17 #include "ui/aura/client/drag_drop_client.h" | 17 #include "ui/aura/client/drag_drop_client.h" |
| 18 #include "ui/aura/client/stacking_client.h" | 18 #include "ui/aura/client/stacking_client.h" |
| 19 #include "ui/aura/client/tooltip_client.h" | 19 #include "ui/aura/client/tooltip_client.h" |
| 20 #include "ui/aura/client/window_drag_drop_delegate.h" | 20 #include "ui/aura/client/window_drag_drop_delegate.h" |
| 21 #include "ui/aura/root_window_host.h" | 21 #include "ui/aura/root_window_host.h" |
| 22 #include "ui/aura/root_window_observer.h" | 22 #include "ui/aura/root_window_observer.h" |
| 23 #include "ui/aura/event.h" | 23 #include "ui/aura/event.h" |
| 24 #include "ui/aura/event_filter.h" | 24 #include "ui/aura/event_filter.h" |
| 25 #include "ui/aura/focus_manager.h" | 25 #include "ui/aura/focus_manager.h" |
| 26 #include "ui/aura/screen_aura.h" | 26 #include "ui/aura/screen_aura.h" |
| 27 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
| 28 #include "ui/aura/window_delegate.h" | 28 #include "ui/aura/window_delegate.h" |
| 29 #include "ui/base/hit_test.h" | 29 #include "ui/base/hit_test.h" |
| 30 #include "ui/base/ime/input_method.h" |
| 30 #include "ui/gfx/compositor/compositor.h" | 31 #include "ui/gfx/compositor/compositor.h" |
| 31 #include "ui/gfx/compositor/layer.h" | 32 #include "ui/gfx/compositor/layer.h" |
| 32 #include "ui/gfx/compositor/layer_animator.h" | 33 #include "ui/gfx/compositor/layer_animator.h" |
| 33 | 34 |
| 34 #ifdef USE_WEBKIT_COMPOSITOR | 35 #ifdef USE_WEBKIT_COMPOSITOR |
| 35 #include "ui/gfx/compositor/compositor_cc.h" | 36 #include "ui/gfx/compositor/compositor_cc.h" |
| 36 #endif | 37 #endif |
| 37 | 38 |
| 38 using std::string; | 39 using std::string; |
| 39 using std::vector; | 40 using std::vector; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 117 } |
| 117 return instance_; | 118 return instance_; |
| 118 } | 119 } |
| 119 | 120 |
| 120 // static | 121 // static |
| 121 void RootWindow::DeleteInstance() { | 122 void RootWindow::DeleteInstance() { |
| 122 delete instance_; | 123 delete instance_; |
| 123 instance_ = NULL; | 124 instance_ = NULL; |
| 124 } | 125 } |
| 125 | 126 |
| 127 void RootWindow::SetInputMethod(ui::InputMethod* input_method) { |
| 128 input_method_.reset(input_method); |
| 129 } |
| 130 |
| 131 ui::InputMethod* RootWindow::GetInputMethod() const { |
| 132 return input_method_.get(); |
| 133 } |
| 134 |
| 126 void RootWindow::SetStackingClient(StackingClient* stacking_client) { | 135 void RootWindow::SetStackingClient(StackingClient* stacking_client) { |
| 127 stacking_client_.reset(stacking_client); | 136 stacking_client_.reset(stacking_client); |
| 128 } | 137 } |
| 129 | 138 |
| 130 void RootWindow::ShowRootWindow() { | 139 void RootWindow::ShowRootWindow() { |
| 131 host_->Show(); | 140 host_->Show(); |
| 132 } | 141 } |
| 133 | 142 |
| 134 void RootWindow::SetHostSize(const gfx::Size& size) { | 143 void RootWindow::SetHostSize(const gfx::Size& size) { |
| 135 host_->SetSize(size); | 144 host_->SetSize(size); |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { | 620 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { |
| 612 bounds.set_size(gfx::Size(parsed_width, parsed_height)); | 621 bounds.set_size(gfx::Size(parsed_width, parsed_height)); |
| 613 } else if (use_fullscreen_host_window_) { | 622 } else if (use_fullscreen_host_window_) { |
| 614 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize()); | 623 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize()); |
| 615 } | 624 } |
| 616 | 625 |
| 617 return bounds; | 626 return bounds; |
| 618 } | 627 } |
| 619 | 628 |
| 620 } // namespace aura | 629 } // namespace aura |
| OLD | NEW |