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 <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2520 bool RenderWidgetHostViewAura::NeedsMouseCapture() { | 2520 bool RenderWidgetHostViewAura::NeedsMouseCapture() { |
2521 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 2521 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
2522 return NeedsInputGrab(); | 2522 return NeedsInputGrab(); |
2523 #endif | 2523 #endif |
2524 return false; | 2524 return false; |
2525 } | 2525 } |
2526 | 2526 |
2527 void RenderWidgetHostViewAura::FinishImeCompositionSession() { | 2527 void RenderWidgetHostViewAura::FinishImeCompositionSession() { |
2528 if (!has_composition_text_) | 2528 if (!has_composition_text_) |
2529 return; | 2529 return; |
2530 // TODO(wjmaclean): can host_ ever be null? | 2530 |
2531 if (host_) { | 2531 if (!!text_input_manager_ && !!text_input_manager_->GetActiveWidget()) { |
2532 host_->ImeConfirmComposition(base::string16(), gfx::Range::InvalidRange(), | 2532 text_input_manager_->GetActiveWidget()->ImeConfirmComposition( |
2533 false); | 2533 base::string16(), gfx::Range::InvalidRange(), false); |
2534 } | 2534 } |
2535 ImeCancelComposition(); | 2535 ImeCancelComposition(); |
2536 } | 2536 } |
2537 | 2537 |
2538 void RenderWidgetHostViewAura::ModifyEventMovementAndCoords( | 2538 void RenderWidgetHostViewAura::ModifyEventMovementAndCoords( |
2539 blink::WebMouseEvent* event) { | 2539 blink::WebMouseEvent* event) { |
2540 // If the mouse has just entered, we must report zero movementX/Y. Hence we | 2540 // If the mouse has just entered, we must report zero movementX/Y. Hence we |
2541 // reset any global_mouse_position set previously. | 2541 // reset any global_mouse_position set previously. |
2542 if (event->type == blink::WebInputEvent::MouseEnter || | 2542 if (event->type == blink::WebInputEvent::MouseEnter || |
2543 event->type == blink::WebInputEvent::MouseLeave) | 2543 event->type == blink::WebInputEvent::MouseLeave) |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3038 | 3038 |
3039 //////////////////////////////////////////////////////////////////////////////// | 3039 //////////////////////////////////////////////////////////////////////////////// |
3040 // RenderWidgetHostViewBase, public: | 3040 // RenderWidgetHostViewBase, public: |
3041 | 3041 |
3042 // static | 3042 // static |
3043 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3043 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
3044 GetScreenInfoForWindow(results, NULL); | 3044 GetScreenInfoForWindow(results, NULL); |
3045 } | 3045 } |
3046 | 3046 |
3047 } // namespace content | 3047 } // namespace content |
OLD | NEW |