Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: chrome/browser/renderer_host/render_widget_host.cc

Issue 5526008: Simplify the magic required to create IPC message headers a bit. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host.h" 5 #include "chrome/browser/renderer_host/render_widget_host.h"
6 6
7 #include "app/keyboard_codes.h" 7 #include "app/keyboard_codes.h"
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 if (!is_accelerated_compositing_active_) { 836 if (!is_accelerated_compositing_active_) {
837 const size_t size = params.bitmap_rect.height() * 837 const size_t size = params.bitmap_rect.height() *
838 params.bitmap_rect.width() * 4; 838 params.bitmap_rect.width() * 4;
839 TransportDIB* dib = process_->GetTransportDIB(params.bitmap); 839 TransportDIB* dib = process_->GetTransportDIB(params.bitmap);
840 840
841 // If gpu process does painting, scroll_rect and copy_rects are always empty 841 // If gpu process does painting, scroll_rect and copy_rects are always empty
842 // and backing store is never used. 842 // and backing store is never used.
843 if (dib) { 843 if (dib) {
844 if (dib->size() < size) { 844 if (dib->size() < size) {
845 DLOG(WARNING) << "Transport DIB too small for given rectangle"; 845 DLOG(WARNING) << "Transport DIB too small for given rectangle";
846 process()->ReceivedBadMessage(ViewHostMsg_UpdateRect__ID); 846 process()->ReceivedBadMessage(ViewHostMsg_UpdateRect::ID);
847 } else { 847 } else {
848 // Scroll the backing store. 848 // Scroll the backing store.
849 if (!params.scroll_rect.IsEmpty()) { 849 if (!params.scroll_rect.IsEmpty()) {
850 ScrollBackingStoreRect(params.dx, params.dy, 850 ScrollBackingStoreRect(params.dx, params.dy,
851 params.scroll_rect, 851 params.scroll_rect,
852 params.view_size); 852 params.view_size);
853 } 853 }
854 854
855 // Paint the backing store. This will update it with the 855 // Paint the backing store. This will update it with the
856 // renderer-supplied bits. The view will read out of the backing store 856 // renderer-supplied bits. The view will read out of the backing store
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 if (!coalesced_mouse_wheel_events_.empty()) { 944 if (!coalesced_mouse_wheel_events_.empty()) {
945 WebMouseWheelEvent next_wheel_event = 945 WebMouseWheelEvent next_wheel_event =
946 coalesced_mouse_wheel_events_.front(); 946 coalesced_mouse_wheel_events_.front();
947 coalesced_mouse_wheel_events_.pop_front(); 947 coalesced_mouse_wheel_events_.pop_front();
948 ForwardWheelEvent(next_wheel_event); 948 ForwardWheelEvent(next_wheel_event);
949 } 949 }
950 } 950 }
951 951
952 void RenderWidgetHost::OnMsgFocus() { 952 void RenderWidgetHost::OnMsgFocus() {
953 // Only RenderViewHost can deal with that message. 953 // Only RenderViewHost can deal with that message.
954 process()->ReceivedBadMessage(ViewHostMsg_Focus__ID); 954 process()->ReceivedBadMessage(ViewHostMsg_Focus::ID);
955 } 955 }
956 956
957 void RenderWidgetHost::OnMsgBlur() { 957 void RenderWidgetHost::OnMsgBlur() {
958 // Only RenderViewHost can deal with that message. 958 // Only RenderViewHost can deal with that message.
959 process()->ReceivedBadMessage(ViewHostMsg_Blur__ID); 959 process()->ReceivedBadMessage(ViewHostMsg_Blur::ID);
960 } 960 }
961 961
962 void RenderWidgetHost::OnMsgSetCursor(const WebCursor& cursor) { 962 void RenderWidgetHost::OnMsgSetCursor(const WebCursor& cursor) {
963 if (!view_) { 963 if (!view_) {
964 return; 964 return;
965 } 965 }
966 view_->UpdateCursor(cursor); 966 view_->UpdateCursor(cursor);
967 } 967 }
968 968
969 void RenderWidgetHost::OnMsgImeUpdateTextInputState( 969 void RenderWidgetHost::OnMsgImeUpdateTextInputState(
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 // of this key event. 1211 // of this key event.
1212 if (!processed && !is_hidden_ && !front_item.skip_in_browser) { 1212 if (!processed && !is_hidden_ && !front_item.skip_in_browser) {
1213 UnhandledKeyboardEvent(front_item); 1213 UnhandledKeyboardEvent(front_item);
1214 1214
1215 // WARNING: This RenderWidgetHost can be deallocated at this point 1215 // WARNING: This RenderWidgetHost can be deallocated at this point
1216 // (i.e. in the case of Ctrl+W, where the call to 1216 // (i.e. in the case of Ctrl+W, where the call to
1217 // UnhandledKeyboardEvent destroys this RenderWidgetHost). 1217 // UnhandledKeyboardEvent destroys this RenderWidgetHost).
1218 } 1218 }
1219 } 1219 }
1220 } 1220 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/importer_messages_internal.h ('k') | chrome/browser/ui/views/about_ipc_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698