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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 IPC_MESSAGE_HANDLER(ViewMsg_ImeSetComposition, OnImeSetComposition) | 392 IPC_MESSAGE_HANDLER(ViewMsg_ImeSetComposition, OnImeSetComposition) |
393 IPC_MESSAGE_HANDLER(ViewMsg_ImeConfirmComposition, OnImeConfirmComposition) | 393 IPC_MESSAGE_HANDLER(ViewMsg_ImeConfirmComposition, OnImeConfirmComposition) |
394 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnPaintAtSize) | 394 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnPaintAtSize) |
395 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) | 395 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) |
396 IPC_MESSAGE_HANDLER(ViewMsg_SyntheticGestureCompleted, | 396 IPC_MESSAGE_HANDLER(ViewMsg_SyntheticGestureCompleted, |
397 OnSyntheticGestureCompleted) | 397 OnSyntheticGestureCompleted) |
398 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 398 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
399 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) | 399 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) |
400 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) | 400 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) |
401 #if defined(OS_ANDROID) | 401 #if defined(OS_ANDROID) |
402 IPC_MESSAGE_HANDLER(ViewMsg_ImeBatchStateChanged, OnImeBatchStateChanged) | |
403 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded) | 402 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded) |
404 IPC_MESSAGE_HANDLER(ViewMsg_ImeEventAck, OnImeEventAck) | 403 IPC_MESSAGE_HANDLER(ViewMsg_ImeEventAck, OnImeEventAck) |
405 #endif | 404 #endif |
406 IPC_MESSAGE_HANDLER(ViewMsg_Snapshot, OnSnapshot) | 405 IPC_MESSAGE_HANDLER(ViewMsg_Snapshot, OnSnapshot) |
407 IPC_MESSAGE_HANDLER(ViewMsg_SetBrowserRenderingStats, | 406 IPC_MESSAGE_HANDLER(ViewMsg_SetBrowserRenderingStats, |
408 OnSetBrowserRenderingStats) | 407 OnSetBrowserRenderingStats) |
409 IPC_MESSAGE_UNHANDLED(handled = false) | 408 IPC_MESSAGE_UNHANDLED(handled = false) |
410 IPC_END_MESSAGE_MAP() | 409 IPC_END_MESSAGE_MAP() |
411 return handled; | 410 return handled; |
412 } | 411 } |
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 } | 2031 } |
2033 | 2032 |
2034 void RenderWidget::OnUpdateScreenRects(const gfx::Rect& view_screen_rect, | 2033 void RenderWidget::OnUpdateScreenRects(const gfx::Rect& view_screen_rect, |
2035 const gfx::Rect& window_screen_rect) { | 2034 const gfx::Rect& window_screen_rect) { |
2036 view_screen_rect_ = view_screen_rect; | 2035 view_screen_rect_ = view_screen_rect; |
2037 window_screen_rect_ = window_screen_rect; | 2036 window_screen_rect_ = window_screen_rect; |
2038 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id())); | 2037 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id())); |
2039 } | 2038 } |
2040 | 2039 |
2041 #if defined(OS_ANDROID) | 2040 #if defined(OS_ANDROID) |
2042 void RenderWidget::OnImeBatchStateChanged(bool is_begin) { | |
2043 Send(new ViewHostMsg_ImeBatchStateChanged_ACK(routing_id(), is_begin)); | |
2044 } | |
2045 | |
2046 void RenderWidget::OnShowImeIfNeeded() { | 2041 void RenderWidget::OnShowImeIfNeeded() { |
2047 UpdateTextInputState(true, true); | 2042 UpdateTextInputState(true, true); |
2048 } | 2043 } |
2049 | 2044 |
2050 void RenderWidget::IncrementOutstandingImeEventAcks() { | 2045 void RenderWidget::IncrementOutstandingImeEventAcks() { |
2051 ++outstanding_ime_acks_; | 2046 ++outstanding_ime_acks_; |
2052 } | 2047 } |
2053 | 2048 |
2054 void RenderWidget::OnImeEventAck() { | 2049 void RenderWidget::OnImeEventAck() { |
2055 --outstanding_ime_acks_; | 2050 --outstanding_ime_acks_; |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2597 kDefaultCommandBufferSize, | 2592 kDefaultCommandBufferSize, |
2598 kDefaultStartTransferBufferSize, | 2593 kDefaultStartTransferBufferSize, |
2599 kDefaultMinTransferBufferSize, | 2594 kDefaultMinTransferBufferSize, |
2600 kDefaultMaxTransferBufferSize, | 2595 kDefaultMaxTransferBufferSize, |
2601 mapped_memory_reclaim_limit)) | 2596 mapped_memory_reclaim_limit)) |
2602 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); | 2597 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); |
2603 return context.Pass(); | 2598 return context.Pass(); |
2604 } | 2599 } |
2605 | 2600 |
2606 } // namespace content | 2601 } // namespace content |
OLD | NEW |