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 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2026 } | 2025 } |
2027 | 2026 |
2028 void RenderWidget::OnUpdateScreenRects(const gfx::Rect& view_screen_rect, | 2027 void RenderWidget::OnUpdateScreenRects(const gfx::Rect& view_screen_rect, |
2029 const gfx::Rect& window_screen_rect) { | 2028 const gfx::Rect& window_screen_rect) { |
2030 view_screen_rect_ = view_screen_rect; | 2029 view_screen_rect_ = view_screen_rect; |
2031 window_screen_rect_ = window_screen_rect; | 2030 window_screen_rect_ = window_screen_rect; |
2032 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id())); | 2031 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id())); |
2033 } | 2032 } |
2034 | 2033 |
2035 #if defined(OS_ANDROID) | 2034 #if defined(OS_ANDROID) |
2036 void RenderWidget::OnImeBatchStateChanged(bool is_begin) { | |
2037 Send(new ViewHostMsg_ImeBatchStateChanged_ACK(routing_id(), is_begin)); | |
2038 } | |
2039 | |
2040 void RenderWidget::OnShowImeIfNeeded() { | 2035 void RenderWidget::OnShowImeIfNeeded() { |
2041 UpdateTextInputState(true, true); | 2036 UpdateTextInputState(true, true); |
2042 } | 2037 } |
2043 | 2038 |
2044 void RenderWidget::IncrementOutstandingImeEventAcks() { | 2039 void RenderWidget::IncrementOutstandingImeEventAcks() { |
2045 ++outstanding_ime_acks_; | 2040 ++outstanding_ime_acks_; |
2046 } | 2041 } |
2047 | 2042 |
2048 void RenderWidget::OnImeEventAck() { | 2043 void RenderWidget::OnImeEventAck() { |
2049 --outstanding_ime_acks_; | 2044 --outstanding_ime_acks_; |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2583 kDefaultCommandBufferSize, | 2578 kDefaultCommandBufferSize, |
2584 kDefaultStartTransferBufferSize, | 2579 kDefaultStartTransferBufferSize, |
2585 kDefaultMinTransferBufferSize, | 2580 kDefaultMinTransferBufferSize, |
2586 kDefaultMaxTransferBufferSize, | 2581 kDefaultMaxTransferBufferSize, |
2587 mapped_memory_reclaim_limit)) | 2582 mapped_memory_reclaim_limit)) |
2588 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); | 2583 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); |
2589 return context.Pass(); | 2584 return context.Pass(); |
2590 } | 2585 } |
2591 | 2586 |
2592 } // namespace content | 2587 } // namespace content |
OLD | NEW |