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

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

Issue 5741001: Even more virtual method deinlining. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (windows) 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 process_->Release(routing_id_); 113 process_->Release(routing_id_);
114 } 114 }
115 115
116 gfx::NativeViewId RenderWidgetHost::GetNativeViewId() { 116 gfx::NativeViewId RenderWidgetHost::GetNativeViewId() {
117 if (view_) 117 if (view_)
118 return gfx::IdFromNativeView(view_->GetNativeView()); 118 return gfx::IdFromNativeView(view_->GetNativeView());
119 return 0; 119 return 0;
120 } 120 }
121 121
122 bool RenderWidgetHost::PreHandleKeyboardEvent(
123 const NativeWebKeyboardEvent& event,
124 bool* is_keyboard_shortcut) {
125 return false;
126 }
127
122 void RenderWidgetHost::Init() { 128 void RenderWidgetHost::Init() {
123 DCHECK(process_->HasConnection()); 129 DCHECK(process_->HasConnection());
124 130
125 renderer_initialized_ = true; 131 renderer_initialized_ = true;
126 132
127 // Send the ack along with the information on placement. 133 // Send the ack along with the information on placement.
128 Send(new ViewMsg_CreatingNew_ACK(routing_id_, GetNativeViewId())); 134 Send(new ViewMsg_CreatingNew_ACK(routing_id_, GetNativeViewId()));
129 WasResized(); 135 WasResized();
130 } 136 }
131 137
132 void RenderWidgetHost::Shutdown() { 138 void RenderWidgetHost::Shutdown() {
133 if (process_->HasConnection()) { 139 if (process_->HasConnection()) {
134 // Tell the renderer object to close. 140 // Tell the renderer object to close.
135 process_->ReportExpectingClose(routing_id_); 141 process_->ReportExpectingClose(routing_id_);
136 bool rv = Send(new ViewMsg_Close(routing_id_)); 142 bool rv = Send(new ViewMsg_Close(routing_id_));
137 DCHECK(rv); 143 DCHECK(rv);
138 } 144 }
139 145
140 Destroy(); 146 Destroy();
141 } 147 }
142 148
149 bool RenderWidgetHost::IsRenderView() const {
150 return false;
151 }
152
143 void RenderWidgetHost::OnMessageReceived(const IPC::Message &msg) { 153 void RenderWidgetHost::OnMessageReceived(const IPC::Message &msg) {
144 bool msg_is_ok = true; 154 bool msg_is_ok = true;
145 IPC_BEGIN_MESSAGE_MAP_EX(RenderWidgetHost, msg, msg_is_ok) 155 IPC_BEGIN_MESSAGE_MAP_EX(RenderWidgetHost, msg, msg_is_ok)
146 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnMsgRenderViewReady) 156 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnMsgRenderViewReady)
147 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnMsgRenderViewGone) 157 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnMsgRenderViewGone)
148 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnMsgClose) 158 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnMsgClose)
149 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove) 159 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove)
150 IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnMsgPaintAtSizeAck) 160 IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnMsgPaintAtSizeAck)
151 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnMsgUpdateRect) 161 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnMsgUpdateRect)
152 IPC_MESSAGE_HANDLER(ViewHostMsg_HandleInputEvent_ACK, OnMsgInputEventAck) 162 IPC_MESSAGE_HANDLER(ViewHostMsg_HandleInputEvent_ACK, OnMsgInputEventAck)
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 return; 1241 return;
1232 1242
1233 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { 1243 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) {
1234 #if defined(TOOLKIT_USES_GTK) 1244 #if defined(TOOLKIT_USES_GTK)
1235 view_->CreatePluginContainer(deferred_plugin_handles_[i]); 1245 view_->CreatePluginContainer(deferred_plugin_handles_[i]);
1236 #endif 1246 #endif
1237 } 1247 }
1238 1248
1239 deferred_plugin_handles_.clear(); 1249 deferred_plugin_handles_.clear();
1240 } 1250 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.h ('k') | chrome/browser/sidebar/sidebar_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698