| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 OnCursorVisibilityChange) | 601 OnCursorVisibilityChange) |
| 602 IPC_MESSAGE_HANDLER(InputMsg_ImeSetComposition, OnImeSetComposition) | 602 IPC_MESSAGE_HANDLER(InputMsg_ImeSetComposition, OnImeSetComposition) |
| 603 IPC_MESSAGE_HANDLER(InputMsg_ImeConfirmComposition, OnImeConfirmComposition) | 603 IPC_MESSAGE_HANDLER(InputMsg_ImeConfirmComposition, OnImeConfirmComposition) |
| 604 IPC_MESSAGE_HANDLER(InputMsg_MouseCaptureLost, OnMouseCaptureLost) | 604 IPC_MESSAGE_HANDLER(InputMsg_MouseCaptureLost, OnMouseCaptureLost) |
| 605 IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetFocus) | 605 IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetFocus) |
| 606 IPC_MESSAGE_HANDLER(InputMsg_SyntheticGestureCompleted, | 606 IPC_MESSAGE_HANDLER(InputMsg_SyntheticGestureCompleted, |
| 607 OnSyntheticGestureCompleted) | 607 OnSyntheticGestureCompleted) |
| 608 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) | 608 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) |
| 609 IPC_MESSAGE_HANDLER(ViewMsg_CreatingNew_ACK, OnCreatingNewAck) | 609 IPC_MESSAGE_HANDLER(ViewMsg_CreatingNew_ACK, OnCreatingNewAck) |
| 610 IPC_MESSAGE_HANDLER(ViewMsg_Resize, OnResize) | 610 IPC_MESSAGE_HANDLER(ViewMsg_Resize, OnResize) |
| 611 IPC_MESSAGE_HANDLER(ViewMsg_ColorProfile, OnColorProfile) |
| 611 IPC_MESSAGE_HANDLER(ViewMsg_ChangeResizeRect, OnChangeResizeRect) | 612 IPC_MESSAGE_HANDLER(ViewMsg_ChangeResizeRect, OnChangeResizeRect) |
| 612 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) | 613 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) |
| 613 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) | 614 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) |
| 614 IPC_MESSAGE_HANDLER(ViewMsg_SetInputMethodActive, OnSetInputMethodActive) | 615 IPC_MESSAGE_HANDLER(ViewMsg_SetInputMethodActive, OnSetInputMethodActive) |
| 615 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowShown, OnCandidateWindowShown) | 616 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowShown, OnCandidateWindowShown) |
| 616 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowUpdated, | 617 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowUpdated, |
| 617 OnCandidateWindowUpdated) | 618 OnCandidateWindowUpdated) |
| 618 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowHidden, OnCandidateWindowHidden) | 619 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowHidden, OnCandidateWindowHidden) |
| 619 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) | 620 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) |
| 620 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 621 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 SetDeviceScaleFactor(screen_info_.deviceScaleFactor); | 775 SetDeviceScaleFactor(screen_info_.deviceScaleFactor); |
| 775 Resize(params.new_size, params.physical_backing_size, | 776 Resize(params.new_size, params.physical_backing_size, |
| 776 params.top_controls_layout_height, | 777 params.top_controls_layout_height, |
| 777 params.visible_viewport_size, params.resizer_rect, | 778 params.visible_viewport_size, params.resizer_rect, |
| 778 params.is_fullscreen, SEND_RESIZE_ACK); | 779 params.is_fullscreen, SEND_RESIZE_ACK); |
| 779 | 780 |
| 780 if (orientation_changed) | 781 if (orientation_changed) |
| 781 OnOrientationChange(); | 782 OnOrientationChange(); |
| 782 } | 783 } |
| 783 | 784 |
| 785 void RenderWidget::OnColorProfile(const std::vector<char>& color_profile) { |
| 786 SetDeviceColorProfile(color_profile); |
| 787 } |
| 788 |
| 784 void RenderWidget::OnChangeResizeRect(const gfx::Rect& resizer_rect) { | 789 void RenderWidget::OnChangeResizeRect(const gfx::Rect& resizer_rect) { |
| 785 if (resizer_rect_ == resizer_rect) | 790 if (resizer_rect_ == resizer_rect) |
| 786 return; | 791 return; |
| 787 resizer_rect_ = resizer_rect; | 792 resizer_rect_ = resizer_rect; |
| 788 if (webwidget_) | 793 if (webwidget_) |
| 789 webwidget_->didChangeWindowResizerRect(); | 794 webwidget_->didChangeWindowResizerRect(); |
| 790 } | 795 } |
| 791 | 796 |
| 792 void RenderWidget::OnWasHidden() { | 797 void RenderWidget::OnWasHidden() { |
| 793 TRACE_EVENT0("renderer", "RenderWidget::OnWasHidden"); | 798 TRACE_EVENT0("renderer", "RenderWidget::OnWasHidden"); |
| (...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2193 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2189 video_hole_frames_.AddObserver(frame); | 2194 video_hole_frames_.AddObserver(frame); |
| 2190 } | 2195 } |
| 2191 | 2196 |
| 2192 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2197 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2193 video_hole_frames_.RemoveObserver(frame); | 2198 video_hole_frames_.RemoveObserver(frame); |
| 2194 } | 2199 } |
| 2195 #endif // defined(VIDEO_HOLE) | 2200 #endif // defined(VIDEO_HOLE) |
| 2196 | 2201 |
| 2197 } // namespace content | 2202 } // namespace content |
| OLD | NEW |