| 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 return window_screen_rect_; | 1626 return window_screen_rect_; |
| 1627 } | 1627 } |
| 1628 | 1628 |
| 1629 WebRect RenderWidget::windowResizerRect() { | 1629 WebRect RenderWidget::windowResizerRect() { |
| 1630 return resizer_rect_; | 1630 return resizer_rect_; |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 void RenderWidget::OnImeSetComposition( | 1633 void RenderWidget::OnImeSetComposition( |
| 1634 const base::string16& text, | 1634 const base::string16& text, |
| 1635 const std::vector<WebCompositionUnderline>& underlines, | 1635 const std::vector<WebCompositionUnderline>& underlines, |
| 1636 const gfx::Range& replacement_range, |
| 1636 int selection_start, int selection_end) { | 1637 int selection_start, int selection_end) { |
| 1637 if (!ShouldHandleImeEvent()) | 1638 if (!ShouldHandleImeEvent()) |
| 1638 return; | 1639 return; |
| 1639 ImeEventGuard guard(this); | 1640 ImeEventGuard guard(this); |
| 1640 if (!webwidget_->setComposition( | 1641 if (!webwidget_->setComposition( |
| 1641 text, WebVector<WebCompositionUnderline>(underlines), | 1642 text, WebVector<WebCompositionUnderline>(underlines), |
| 1642 selection_start, selection_end)) { | 1643 selection_start, selection_end)) { |
| 1643 // If we failed to set the composition text, then we need to let the browser | 1644 // If we failed to set the composition text, then we need to let the browser |
| 1644 // process to cancel the input method's ongoing composition session, to make | 1645 // process to cancel the input method's ongoing composition session, to make |
| 1645 // sure we are in a consistent state. | 1646 // sure we are in a consistent state. |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2272 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2272 video_hole_frames_.AddObserver(frame); | 2273 video_hole_frames_.AddObserver(frame); |
| 2273 } | 2274 } |
| 2274 | 2275 |
| 2275 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2276 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2276 video_hole_frames_.RemoveObserver(frame); | 2277 video_hole_frames_.RemoveObserver(frame); |
| 2277 } | 2278 } |
| 2278 #endif // defined(VIDEO_HOLE) | 2279 #endif // defined(VIDEO_HOLE) |
| 2279 | 2280 |
| 2280 } // namespace content | 2281 } // namespace content |
| OLD | NEW |