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_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <peninputpanel_i.c> | 8 #include <peninputpanel_i.c> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 628 |
629 void RenderWidgetHostViewWin::InitAsPopup( | 629 void RenderWidgetHostViewWin::InitAsPopup( |
630 RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { | 630 RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { |
631 close_on_deactivate_ = true; | 631 close_on_deactivate_ = true; |
632 DoPopupOrFullscreenInit(parent_host_view->GetNativeView(), pos, | 632 DoPopupOrFullscreenInit(parent_host_view->GetNativeView(), pos, |
633 WS_EX_TOOLWINDOW); | 633 WS_EX_TOOLWINDOW); |
634 } | 634 } |
635 | 635 |
636 void RenderWidgetHostViewWin::InitAsFullscreen( | 636 void RenderWidgetHostViewWin::InitAsFullscreen( |
637 RenderWidgetHostView* reference_host_view) { | 637 RenderWidgetHostView* reference_host_view) { |
638 gfx::Rect pos = gfx::Screen::GetMonitorNearestWindow( | 638 gfx::Rect pos = gfx::Screen::GetDisplayNearestWindow( |
639 reference_host_view->GetNativeView()).bounds(); | 639 reference_host_view->GetNativeView()).bounds(); |
640 is_fullscreen_ = true; | 640 is_fullscreen_ = true; |
641 DoPopupOrFullscreenInit(ui::GetWindowToParentTo(true), pos, 0); | 641 DoPopupOrFullscreenInit(ui::GetWindowToParentTo(true), pos, 0); |
642 } | 642 } |
643 | 643 |
644 RenderWidgetHost* RenderWidgetHostViewWin::GetRenderWidgetHost() const { | 644 RenderWidgetHost* RenderWidgetHostViewWin::GetRenderWidgetHost() const { |
645 return render_widget_host_; | 645 return render_widget_host_; |
646 } | 646 } |
647 | 647 |
648 void RenderWidgetHostViewWin::DidBecomeSelected() { | 648 void RenderWidgetHostViewWin::DidBecomeSelected() { |
(...skipping 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3085 void RenderWidgetHostViewWin::ResetPointerDownContext() { | 3085 void RenderWidgetHostViewWin::ResetPointerDownContext() { |
3086 // If the default focus on the page is on an edit field and we did not | 3086 // If the default focus on the page is on an edit field and we did not |
3087 // receive a focus change in the context of a pointer down message, it means | 3087 // receive a focus change in the context of a pointer down message, it means |
3088 // that the pointer down message occurred on the edit field and we should | 3088 // that the pointer down message occurred on the edit field and we should |
3089 // display the on screen keyboard | 3089 // display the on screen keyboard |
3090 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3090 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
3091 DisplayOnScreenKeyboardIfNeeded(); | 3091 DisplayOnScreenKeyboardIfNeeded(); |
3092 received_focus_change_after_pointer_down_ = false; | 3092 received_focus_change_after_pointer_down_ = false; |
3093 pointer_down_context_ = false; | 3093 pointer_down_context_ = false; |
3094 } | 3094 } |
OLD | NEW |