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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 382 |
383 void RenderWidgetHostViewWin::InitAsPopup( | 383 void RenderWidgetHostViewWin::InitAsPopup( |
384 RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { | 384 RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { |
385 close_on_deactivate_ = true; | 385 close_on_deactivate_ = true; |
386 DoPopupOrFullscreenInit(parent_host_view->GetNativeView(), pos, | 386 DoPopupOrFullscreenInit(parent_host_view->GetNativeView(), pos, |
387 WS_EX_TOOLWINDOW); | 387 WS_EX_TOOLWINDOW); |
388 } | 388 } |
389 | 389 |
390 void RenderWidgetHostViewWin::InitAsFullscreen( | 390 void RenderWidgetHostViewWin::InitAsFullscreen( |
391 RenderWidgetHostView* reference_host_view) { | 391 RenderWidgetHostView* reference_host_view) { |
392 gfx::Rect pos = gfx::Screen::GetMonitorAreaNearestWindow( | 392 gfx::Rect pos = gfx::Screen::GetMonitorNearestWindow( |
393 reference_host_view->GetNativeView()); | 393 reference_host_view->GetNativeView()).bounds(); |
394 is_fullscreen_ = true; | 394 is_fullscreen_ = true; |
395 DoPopupOrFullscreenInit(GetDesktopWindow(), pos, 0); | 395 DoPopupOrFullscreenInit(GetDesktopWindow(), pos, 0); |
396 } | 396 } |
397 | 397 |
398 RenderWidgetHost* RenderWidgetHostViewWin::GetRenderWidgetHost() const { | 398 RenderWidgetHost* RenderWidgetHostViewWin::GetRenderWidgetHost() const { |
399 return render_widget_host_; | 399 return render_widget_host_; |
400 } | 400 } |
401 | 401 |
402 void RenderWidgetHostViewWin::DidBecomeSelected() { | 402 void RenderWidgetHostViewWin::DidBecomeSelected() { |
403 if (!is_hidden_) | 403 if (!is_hidden_) |
(...skipping 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2692 void RenderWidgetHostViewWin::ResetPointerDownContext() { | 2692 void RenderWidgetHostViewWin::ResetPointerDownContext() { |
2693 // If the default focus on the page is on an edit field and we did not | 2693 // If the default focus on the page is on an edit field and we did not |
2694 // receive a focus change in the context of a pointer down message, it means | 2694 // receive a focus change in the context of a pointer down message, it means |
2695 // that the pointer down message occurred on the edit field and we should | 2695 // that the pointer down message occurred on the edit field and we should |
2696 // display the on screen keyboard | 2696 // display the on screen keyboard |
2697 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 2697 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
2698 DisplayOnScreenKeyboardIfNeeded(); | 2698 DisplayOnScreenKeyboardIfNeeded(); |
2699 received_focus_change_after_pointer_down_ = false; | 2699 received_focus_change_after_pointer_down_ = false; |
2700 pointer_down_context_ = false; | 2700 pointer_down_context_ = false; |
2701 } | 2701 } |
OLD | NEW |