| 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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 } | 1653 } |
| 1654 | 1654 |
| 1655 void RenderWidget::OnSetInputMethodActive(bool is_active) { | 1655 void RenderWidget::OnSetInputMethodActive(bool is_active) { |
| 1656 // To prevent this renderer process from sending unnecessary IPC messages to | 1656 // To prevent this renderer process from sending unnecessary IPC messages to |
| 1657 // a browser process, we permit the renderer process to send IPC messages | 1657 // a browser process, we permit the renderer process to send IPC messages |
| 1658 // only during the input method attached to the browser process is active. | 1658 // only during the input method attached to the browser process is active. |
| 1659 input_method_is_active_ = is_active; | 1659 input_method_is_active_ = is_active; |
| 1660 } | 1660 } |
| 1661 | 1661 |
| 1662 void RenderWidget::OnCandidateWindowShown() { | 1662 void RenderWidget::OnCandidateWindowShown() { |
| 1663 webwidget_->didShowCandidateWindow(); | |
| 1664 } | 1663 } |
| 1665 | 1664 |
| 1666 void RenderWidget::OnCandidateWindowUpdated() { | 1665 void RenderWidget::OnCandidateWindowUpdated() { |
| 1667 webwidget_->didUpdateCandidateWindow(); | |
| 1668 } | 1666 } |
| 1669 | 1667 |
| 1670 void RenderWidget::OnCandidateWindowHidden() { | 1668 void RenderWidget::OnCandidateWindowHidden() { |
| 1671 webwidget_->didHideCandidateWindow(); | |
| 1672 } | 1669 } |
| 1673 | 1670 |
| 1674 void RenderWidget::OnImeSetComposition( | 1671 void RenderWidget::OnImeSetComposition( |
| 1675 const base::string16& text, | 1672 const base::string16& text, |
| 1676 const std::vector<WebCompositionUnderline>& underlines, | 1673 const std::vector<WebCompositionUnderline>& underlines, |
| 1677 int selection_start, int selection_end) { | 1674 int selection_start, int selection_end) { |
| 1678 if (!ShouldHandleImeEvent()) | 1675 if (!ShouldHandleImeEvent()) |
| 1679 return; | 1676 return; |
| 1680 ImeEventGuard guard(this); | 1677 ImeEventGuard guard(this); |
| 1681 if (!webwidget_->setComposition( | 1678 if (!webwidget_->setComposition( |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2452 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2449 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2453 video_hole_frames_.AddObserver(frame); | 2450 video_hole_frames_.AddObserver(frame); |
| 2454 } | 2451 } |
| 2455 | 2452 |
| 2456 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2453 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2457 video_hole_frames_.RemoveObserver(frame); | 2454 video_hole_frames_.RemoveObserver(frame); |
| 2458 } | 2455 } |
| 2459 #endif // defined(VIDEO_HOLE) | 2456 #endif // defined(VIDEO_HOLE) |
| 2460 | 2457 |
| 2461 } // namespace content | 2458 } // namespace content |
| OLD | NEW |