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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 text_input_mode_(ui::TEXT_INPUT_MODE_DEFAULT), | 443 text_input_mode_(ui::TEXT_INPUT_MODE_DEFAULT), |
444 can_compose_inline_(true), | 444 can_compose_inline_(true), |
445 has_composition_text_(false), | 445 has_composition_text_(false), |
446 accept_return_character_(false), | 446 accept_return_character_(false), |
447 last_swapped_software_frame_scale_factor_(1.f), | 447 last_swapped_software_frame_scale_factor_(1.f), |
448 paint_canvas_(NULL), | 448 paint_canvas_(NULL), |
449 synthetic_move_sent_(false), | 449 synthetic_move_sent_(false), |
450 cursor_visibility_state_in_renderer_(UNKNOWN), | 450 cursor_visibility_state_in_renderer_(UNKNOWN), |
451 #if defined(OS_WIN) | 451 #if defined(OS_WIN) |
452 legacy_render_widget_host_HWND_(NULL), | 452 legacy_render_widget_host_HWND_(NULL), |
453 legacy_window_destroyed_(false), | |
454 #endif | 453 #endif |
455 has_snapped_to_boundary_(false), | 454 has_snapped_to_boundary_(false), |
456 touch_editing_client_(NULL), | 455 touch_editing_client_(NULL), |
457 is_guest_view_hack_(is_guest_view_hack), | 456 is_guest_view_hack_(is_guest_view_hack), |
458 weak_ptr_factory_(this) { | 457 weak_ptr_factory_(this) { |
459 if (!is_guest_view_hack_) | 458 if (!is_guest_view_hack_) |
460 host_->SetView(this); | 459 host_->SetView(this); |
461 | 460 |
462 window_observer_.reset(new WindowObserver(this)); | 461 window_observer_.reset(new WindowObserver(this)); |
463 aura::client::SetTooltipText(window_, &tooltip_); | 462 aura::client::SetTooltipText(window_, &tooltip_); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 if (root) { | 596 if (root) { |
598 aura::client::CursorClient* cursor_client = | 597 aura::client::CursorClient* cursor_client = |
599 aura::client::GetCursorClient(root); | 598 aura::client::GetCursorClient(root); |
600 if (cursor_client) | 599 if (cursor_client) |
601 NotifyRendererOfCursorVisibilityState(cursor_client->IsCursorVisible()); | 600 NotifyRendererOfCursorVisibilityState(cursor_client->IsCursorVisible()); |
602 } | 601 } |
603 | 602 |
604 delegated_frame_host_->WasShown(browser_latency_info); | 603 delegated_frame_host_->WasShown(browser_latency_info); |
605 | 604 |
606 #if defined(OS_WIN) | 605 #if defined(OS_WIN) |
607 if (legacy_render_widget_host_HWND_) { | |
608 // Reparent the legacy Chrome_RenderWidgetHostHWND window to the parent | |
609 // window before reparenting any plugins. This ensures that the plugin | |
610 // windows stay on top of the child Zorder in the parent and receive | |
611 // mouse events, etc. | |
612 legacy_render_widget_host_HWND_->UpdateParent( | |
613 GetNativeView()->GetHost()->GetAcceleratedWidget()); | |
614 legacy_render_widget_host_HWND_->SetBounds( | |
615 window_->GetBoundsInRootWindow()); | |
616 } | |
617 LPARAM lparam = reinterpret_cast<LPARAM>(this); | 606 LPARAM lparam = reinterpret_cast<LPARAM>(this); |
618 EnumChildWindows(ui::GetHiddenWindow(), ShowWindowsCallback, lparam); | 607 EnumChildWindows(ui::GetHiddenWindow(), ShowWindowsCallback, lparam); |
619 #endif | 608 #endif |
620 } | 609 } |
621 | 610 |
622 void RenderWidgetHostViewAura::WasHidden() { | 611 void RenderWidgetHostViewAura::WasHidden() { |
623 if (!host_ || host_->is_hidden()) | 612 if (!host_ || host_->is_hidden()) |
624 return; | 613 return; |
625 host_->WasHidden(); | 614 host_->WasHidden(); |
626 delegated_frame_host_->WasHidden(); | 615 delegated_frame_host_->WasHidden(); |
627 | 616 |
628 #if defined(OS_WIN) | 617 #if defined(OS_WIN) |
629 constrained_rects_.clear(); | 618 constrained_rects_.clear(); |
630 aura::WindowTreeHost* host = window_->GetHost(); | 619 aura::WindowTreeHost* host = window_->GetHost(); |
631 if (host) { | 620 if (host) { |
632 HWND parent = host->GetAcceleratedWidget(); | 621 HWND parent = host->GetAcceleratedWidget(); |
633 LPARAM lparam = reinterpret_cast<LPARAM>(this); | 622 LPARAM lparam = reinterpret_cast<LPARAM>(this); |
634 EnumChildWindows(parent, HideWindowsCallback, lparam); | 623 EnumChildWindows(parent, HideWindowsCallback, lparam); |
635 // We reparent the legacy Chrome_RenderWidgetHostHWND window to the global | |
636 // hidden window on the same lines as Windowed plugin windows. | |
637 if (legacy_render_widget_host_HWND_) | |
638 legacy_render_widget_host_HWND_->UpdateParent(ui::GetHiddenWindow()); | |
639 } | 624 } |
640 #endif | 625 #endif |
641 } | 626 } |
642 | 627 |
643 void RenderWidgetHostViewAura::SetSize(const gfx::Size& size) { | 628 void RenderWidgetHostViewAura::SetSize(const gfx::Size& size) { |
644 // For a SetSize operation, we don't care what coordinate system the origin | 629 // For a SetSize operation, we don't care what coordinate system the origin |
645 // of the window is in, it's only important to make sure that the origin | 630 // of the window is in, it's only important to make sure that the origin |
646 // remains constant after the operation. | 631 // remains constant after the operation. |
647 InternalSetBounds(gfx::Rect(window_->bounds().origin(), size)); | 632 InternalSetBounds(gfx::Rect(window_->bounds().origin(), size)); |
648 } | 633 } |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 return window_->HasFocus(); | 778 return window_->HasFocus(); |
794 } | 779 } |
795 | 780 |
796 bool RenderWidgetHostViewAura::IsSurfaceAvailableForCopy() const { | 781 bool RenderWidgetHostViewAura::IsSurfaceAvailableForCopy() const { |
797 return delegated_frame_host_->CanCopyToBitmap(); | 782 return delegated_frame_host_->CanCopyToBitmap(); |
798 } | 783 } |
799 | 784 |
800 void RenderWidgetHostViewAura::Show() { | 785 void RenderWidgetHostViewAura::Show() { |
801 window_->Show(); | 786 window_->Show(); |
802 WasShown(); | 787 WasShown(); |
803 #if defined(OS_WIN) | |
804 if (legacy_render_widget_host_HWND_) | |
805 legacy_render_widget_host_HWND_->Show(); | |
806 #endif | |
807 } | 788 } |
808 | 789 |
809 void RenderWidgetHostViewAura::Hide() { | 790 void RenderWidgetHostViewAura::Hide() { |
810 window_->Hide(); | 791 window_->Hide(); |
811 WasHidden(); | 792 WasHidden(); |
812 #if defined(OS_WIN) | |
813 if (legacy_render_widget_host_HWND_) | |
814 legacy_render_widget_host_HWND_->Hide(); | |
815 #endif | |
816 } | 793 } |
817 | 794 |
818 bool RenderWidgetHostViewAura::IsShowing() { | 795 bool RenderWidgetHostViewAura::IsShowing() { |
819 return window_->IsVisible(); | 796 return window_->IsVisible(); |
820 } | 797 } |
821 | 798 |
822 gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { | 799 gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { |
823 return window_->GetBoundsInScreen(); | 800 return window_->GetBoundsInScreen(); |
824 } | 801 } |
825 | 802 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 EnumChildWindows(parent, SetCutoutRectsCallback, lparam); | 1003 EnumChildWindows(parent, SetCutoutRectsCallback, lparam); |
1027 } | 1004 } |
1028 | 1005 |
1029 void RenderWidgetHostViewAura::UpdateMouseLockRegion() { | 1006 void RenderWidgetHostViewAura::UpdateMouseLockRegion() { |
1030 // Clip the cursor if chrome is running on regular desktop. | 1007 // Clip the cursor if chrome is running on regular desktop. |
1031 if (gfx::Screen::GetScreenFor(window_) == gfx::Screen::GetNativeScreen()) { | 1008 if (gfx::Screen::GetScreenFor(window_) == gfx::Screen::GetNativeScreen()) { |
1032 RECT window_rect = window_->GetBoundsInScreen().ToRECT(); | 1009 RECT window_rect = window_->GetBoundsInScreen().ToRECT(); |
1033 ::ClipCursor(&window_rect); | 1010 ::ClipCursor(&window_rect); |
1034 } | 1011 } |
1035 } | 1012 } |
1036 | 1013 #endif // defined(OS_WIN) |
1037 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() { | |
1038 legacy_render_widget_host_HWND_ = NULL; | |
1039 legacy_window_destroyed_ = true; | |
1040 } | |
1041 #endif | |
1042 | 1014 |
1043 void RenderWidgetHostViewAura::OnSwapCompositorFrame( | 1015 void RenderWidgetHostViewAura::OnSwapCompositorFrame( |
1044 uint32 output_surface_id, | 1016 uint32 output_surface_id, |
1045 scoped_ptr<cc::CompositorFrame> frame) { | 1017 scoped_ptr<cc::CompositorFrame> frame) { |
1046 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); | 1018 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); |
1047 | 1019 |
1048 last_scroll_offset_ = frame->metadata.root_scroll_offset; | 1020 last_scroll_offset_ = frame->metadata.root_scroll_offset; |
1049 if (frame->delegated_frame_data) { | 1021 if (frame->delegated_frame_data) { |
1050 delegated_frame_host_->SwapDelegatedFrame( | 1022 delegated_frame_host_->SwapDelegatedFrame( |
1051 output_surface_id, | 1023 output_surface_id, |
(...skipping 11 matching lines...) Expand all Loading... |
1063 return; | 1035 return; |
1064 } | 1036 } |
1065 } | 1037 } |
1066 | 1038 |
1067 void RenderWidgetHostViewAura::DidStopFlinging() { | 1039 void RenderWidgetHostViewAura::DidStopFlinging() { |
1068 if (touch_editing_client_) | 1040 if (touch_editing_client_) |
1069 touch_editing_client_->DidStopFlinging(); | 1041 touch_editing_client_->DidStopFlinging(); |
1070 } | 1042 } |
1071 | 1043 |
1072 #if defined(OS_WIN) | 1044 #if defined(OS_WIN) |
| 1045 void RenderWidgetHostViewAura::SetLegacyRenderWidgetHostHWND( |
| 1046 LegacyRenderWidgetHostHWND* legacy_hwnd) { |
| 1047 legacy_render_widget_host_HWND_ = legacy_hwnd; |
| 1048 } |
| 1049 |
1073 void RenderWidgetHostViewAura::SetParentNativeViewAccessible( | 1050 void RenderWidgetHostViewAura::SetParentNativeViewAccessible( |
1074 gfx::NativeViewAccessible accessible_parent) { | 1051 gfx::NativeViewAccessible accessible_parent) { |
1075 } | 1052 } |
1076 | 1053 |
1077 gfx::NativeViewId RenderWidgetHostViewAura::GetParentForWindowlessPlugin() | 1054 gfx::NativeViewId RenderWidgetHostViewAura::GetParentForWindowlessPlugin() |
1078 const { | 1055 const { |
1079 if (legacy_render_widget_host_HWND_) { | 1056 if (legacy_render_widget_host_HWND_) { |
1080 return reinterpret_cast<gfx::NativeViewId>( | 1057 return reinterpret_cast<gfx::NativeViewId>( |
1081 legacy_render_widget_host_HWND_->hwnd()); | 1058 legacy_render_widget_host_HWND_->hwnd()); |
1082 } | 1059 } |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1734 HWND parent = NULL; | 1711 HWND parent = NULL; |
1735 // If the tab was hidden and it's closed, host_->is_hidden would have been | 1712 // If the tab was hidden and it's closed, host_->is_hidden would have been |
1736 // reset to false in RenderWidgetHostImpl::RendererExited. | 1713 // reset to false in RenderWidgetHostImpl::RendererExited. |
1737 if (!window_->GetRootWindow() || host_->is_hidden()) { | 1714 if (!window_->GetRootWindow() || host_->is_hidden()) { |
1738 parent = ui::GetHiddenWindow(); | 1715 parent = ui::GetHiddenWindow(); |
1739 } else { | 1716 } else { |
1740 parent = window_->GetHost()->GetAcceleratedWidget(); | 1717 parent = window_->GetHost()->GetAcceleratedWidget(); |
1741 } | 1718 } |
1742 LPARAM lparam = reinterpret_cast<LPARAM>(this); | 1719 LPARAM lparam = reinterpret_cast<LPARAM>(this); |
1743 EnumChildWindows(parent, WindowDestroyingCallback, lparam); | 1720 EnumChildWindows(parent, WindowDestroyingCallback, lparam); |
1744 | 1721 legacy_render_widget_host_HWND_ = NULL; |
1745 // The LegacyRenderWidgetHostHWND instance is destroyed when its window is | |
1746 // destroyed. Normally we control when that happens via the Destroy call | |
1747 // in the dtor. However there may be cases where the window is destroyed | |
1748 // by Windows, i.e. the parent window is destroyed before the | |
1749 // RenderWidgetHostViewAura instance goes away etc. To avoid that we | |
1750 // destroy the LegacyRenderWidgetHostHWND instance here. | |
1751 if (legacy_render_widget_host_HWND_) { | |
1752 legacy_render_widget_host_HWND_->set_host(NULL); | |
1753 legacy_render_widget_host_HWND_->Destroy(); | |
1754 // The Destroy call above will delete the LegacyRenderWidgetHostHWND | |
1755 // instance. | |
1756 legacy_render_widget_host_HWND_ = NULL; | |
1757 } | |
1758 #endif | 1722 #endif |
1759 | 1723 |
1760 // Make sure that the input method no longer references to this object before | 1724 // Make sure that the input method no longer references to this object before |
1761 // this object is removed from the root window (i.e. this object loses access | 1725 // this object is removed from the root window (i.e. this object loses access |
1762 // to the input method). | 1726 // to the input method). |
1763 ui::InputMethod* input_method = GetInputMethod(); | 1727 ui::InputMethod* input_method = GetInputMethod(); |
1764 if (input_method) | 1728 if (input_method) |
1765 input_method->DetachTextInputClient(this); | 1729 input_method->DetachTextInputClient(this); |
1766 | 1730 |
1767 if (overscroll_controller_) | 1731 if (overscroll_controller_) |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2252 popup_child_host_view_->popup_parent_host_view_ = NULL; | 2216 popup_child_host_view_->popup_parent_host_view_ = NULL; |
2253 } | 2217 } |
2254 event_filter_for_popup_exit_.reset(); | 2218 event_filter_for_popup_exit_.reset(); |
2255 aura::client::SetTooltipText(window_, NULL); | 2219 aura::client::SetTooltipText(window_, NULL); |
2256 gfx::Screen::GetScreenFor(window_)->RemoveObserver(this); | 2220 gfx::Screen::GetScreenFor(window_)->RemoveObserver(this); |
2257 | 2221 |
2258 // This call is usually no-op since |this| object is already removed from the | 2222 // This call is usually no-op since |this| object is already removed from the |
2259 // Aura root window and we don't have a way to get an input method object | 2223 // Aura root window and we don't have a way to get an input method object |
2260 // associated with the window, but just in case. | 2224 // associated with the window, but just in case. |
2261 DetachFromInputMethod(); | 2225 DetachFromInputMethod(); |
2262 | |
2263 #if defined(OS_WIN) | |
2264 // The LegacyRenderWidgetHostHWND window should have been destroyed in | |
2265 // RenderWidgetHostViewAura::OnWindowDestroying and the pointer should | |
2266 // be set to NULL. | |
2267 DCHECK(!legacy_render_widget_host_HWND_); | |
2268 #endif | |
2269 } | 2226 } |
2270 | 2227 |
2271 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { | 2228 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { |
2272 const gfx::Point screen_point = | 2229 const gfx::Point screen_point = |
2273 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(); | 2230 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(); |
2274 aura::Window* root_window = window_->GetRootWindow(); | 2231 aura::Window* root_window = window_->GetRootWindow(); |
2275 if (!root_window) | 2232 if (!root_window) |
2276 return; | 2233 return; |
2277 | 2234 |
2278 gfx::Point root_window_point = screen_point; | 2235 gfx::Point root_window_point = screen_point; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2408 // a Window::SetBoundsInternal call. | 2365 // a Window::SetBoundsInternal call. |
2409 if (!in_bounds_changed_) | 2366 if (!in_bounds_changed_) |
2410 window_->SetBounds(rect); | 2367 window_->SetBounds(rect); |
2411 host_->WasResized(); | 2368 host_->WasResized(); |
2412 delegated_frame_host_->WasResized(); | 2369 delegated_frame_host_->WasResized(); |
2413 if (touch_editing_client_) { | 2370 if (touch_editing_client_) { |
2414 touch_editing_client_->OnSelectionOrCursorChanged(selection_anchor_rect_, | 2371 touch_editing_client_->OnSelectionOrCursorChanged(selection_anchor_rect_, |
2415 selection_focus_rect_); | 2372 selection_focus_rect_); |
2416 } | 2373 } |
2417 #if defined(OS_WIN) | 2374 #if defined(OS_WIN) |
2418 // Create the legacy dummy window which corresponds to the bounds of the | |
2419 // webcontents. This will be passed as the container window for windowless | |
2420 // plugins. | |
2421 // Plugins like Flash assume the container window which is returned via the | |
2422 // NPNVnetscapeWindow property corresponds to the bounds of the webpage. | |
2423 // This is not true in Aura where we have only HWND which is the main Aura | |
2424 // window. If we return this window to plugins like Flash then it causes the | |
2425 // coordinate translations done by these plugins to break. | |
2426 // Additonally the legacy dummy window is needed for accessibility and for | |
2427 // scrolling to work in legacy drivers for trackpoints/trackpads, etc. | |
2428 if (!legacy_window_destroyed_ && GetNativeViewId()) { | |
2429 if (!legacy_render_widget_host_HWND_) { | |
2430 legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create( | |
2431 reinterpret_cast<HWND>(GetNativeViewId())); | |
2432 } | |
2433 if (legacy_render_widget_host_HWND_) { | |
2434 legacy_render_widget_host_HWND_->set_host(this); | |
2435 legacy_render_widget_host_HWND_->SetBounds( | |
2436 window_->GetBoundsInRootWindow()); | |
2437 // There are cases where the parent window is created, made visible and | |
2438 // the associated RenderWidget is also visible before the | |
2439 // LegacyRenderWidgetHostHWND instace is created. Ensure that it is shown | |
2440 // here. | |
2441 if (!host_->is_hidden()) | |
2442 legacy_render_widget_host_HWND_->Show(); | |
2443 } | |
2444 } | |
2445 | |
2446 if (mouse_locked_) | 2375 if (mouse_locked_) |
2447 UpdateMouseLockRegion(); | 2376 UpdateMouseLockRegion(); |
2448 #endif | 2377 #endif |
2449 } | 2378 } |
2450 | 2379 |
2451 void RenderWidgetHostViewAura::SchedulePaintIfNotInClip( | 2380 void RenderWidgetHostViewAura::SchedulePaintIfNotInClip( |
2452 const gfx::Rect& rect, | 2381 const gfx::Rect& rect, |
2453 const gfx::Rect& clip) { | 2382 const gfx::Rect& clip) { |
2454 if (!clip.IsEmpty()) { | 2383 if (!clip.IsEmpty()) { |
2455 gfx::Rect to_paint = gfx::SubtractRects(rect, clip); | 2384 gfx::Rect to_paint = gfx::SubtractRects(rect, clip); |
(...skipping 25 matching lines...) Expand all Loading... |
2481 if (cursor_client) { | 2410 if (cursor_client) { |
2482 cursor_client->AddObserver(this); | 2411 cursor_client->AddObserver(this); |
2483 NotifyRendererOfCursorVisibilityState(cursor_client->IsCursorVisible()); | 2412 NotifyRendererOfCursorVisibilityState(cursor_client->IsCursorVisible()); |
2484 } | 2413 } |
2485 if (HasFocus()) { | 2414 if (HasFocus()) { |
2486 ui::InputMethod* input_method = GetInputMethod(); | 2415 ui::InputMethod* input_method = GetInputMethod(); |
2487 if (input_method) | 2416 if (input_method) |
2488 input_method->SetFocusedTextInputClient(this); | 2417 input_method->SetFocusedTextInputClient(this); |
2489 } | 2418 } |
2490 | 2419 |
2491 #if defined(OS_WIN) | |
2492 // The parent may have changed here. Ensure that the legacy window is | |
2493 // reparented accordingly. | |
2494 if (legacy_render_widget_host_HWND_) | |
2495 legacy_render_widget_host_HWND_->UpdateParent( | |
2496 reinterpret_cast<HWND>(GetNativeViewId())); | |
2497 #endif | |
2498 | |
2499 delegated_frame_host_->AddedToWindow(); | 2420 delegated_frame_host_->AddedToWindow(); |
2500 } | 2421 } |
2501 | 2422 |
2502 void RenderWidgetHostViewAura::RemovingFromRootWindow() { | 2423 void RenderWidgetHostViewAura::RemovingFromRootWindow() { |
2503 aura::client::CursorClient* cursor_client = | 2424 aura::client::CursorClient* cursor_client = |
2504 aura::client::GetCursorClient(window_->GetRootWindow()); | 2425 aura::client::GetCursorClient(window_->GetRootWindow()); |
2505 if (cursor_client) | 2426 if (cursor_client) |
2506 cursor_client->RemoveObserver(this); | 2427 cursor_client->RemoveObserver(this); |
2507 | 2428 |
2508 DetachFromInputMethod(); | 2429 DetachFromInputMethod(); |
2509 | 2430 |
2510 window_->GetHost()->RemoveObserver(this); | 2431 window_->GetHost()->RemoveObserver(this); |
2511 delegated_frame_host_->RemovingFromWindow(); | 2432 delegated_frame_host_->RemovingFromWindow(); |
2512 | |
2513 #if defined(OS_WIN) | |
2514 // Update the legacy window's parent temporarily to the desktop window. It | |
2515 // will eventually get reparented to the right root. | |
2516 if (legacy_render_widget_host_HWND_) | |
2517 legacy_render_widget_host_HWND_->UpdateParent(::GetDesktopWindow()); | |
2518 #endif | |
2519 } | 2433 } |
2520 | 2434 |
2521 void RenderWidgetHostViewAura::DetachFromInputMethod() { | 2435 void RenderWidgetHostViewAura::DetachFromInputMethod() { |
2522 ui::InputMethod* input_method = GetInputMethod(); | 2436 ui::InputMethod* input_method = GetInputMethod(); |
2523 if (input_method && input_method->GetTextInputClient() == this) | 2437 if (input_method && input_method->GetTextInputClient() == this) |
2524 input_method->SetFocusedTextInputClient(NULL); | 2438 input_method->SetFocusedTextInputClient(NULL); |
2525 } | 2439 } |
2526 | 2440 |
2527 void RenderWidgetHostViewAura::ForwardKeyboardEvent( | 2441 void RenderWidgetHostViewAura::ForwardKeyboardEvent( |
2528 const NativeWebKeyboardEvent& event) { | 2442 const NativeWebKeyboardEvent& event) { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2606 | 2520 |
2607 //////////////////////////////////////////////////////////////////////////////// | 2521 //////////////////////////////////////////////////////////////////////////////// |
2608 // RenderWidgetHostViewBase, public: | 2522 // RenderWidgetHostViewBase, public: |
2609 | 2523 |
2610 // static | 2524 // static |
2611 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2525 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2612 GetScreenInfoForWindow(results, NULL); | 2526 GetScreenInfoForWindow(results, NULL); |
2613 } | 2527 } |
2614 | 2528 |
2615 } // namespace content | 2529 } // namespace content |
OLD | NEW |