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

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

Issue 7972006: Removed sending of the content IPC messages from chrome and replaced them with corresponding APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/renderer_host/render_widget_host.h" 5 #include "content/browser/renderer_host/render_widget_host.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.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/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 10 matching lines...) Expand all
21 #include "content/browser/user_metrics.h" 21 #include "content/browser/user_metrics.h"
22 #include "content/common/content_switches.h" 22 #include "content/common/content_switches.h"
23 #include "content/common/gpu/gpu_messages.h" 23 #include "content/common/gpu/gpu_messages.h"
24 #include "content/common/native_web_keyboard_event.h" 24 #include "content/common/native_web_keyboard_event.h"
25 #include "content/common/notification_service.h" 25 #include "content/common/notification_service.h"
26 #include "content/common/result_codes.h" 26 #include "content/common/result_codes.h"
27 #include "content/common/view_messages.h" 27 #include "content/common/view_messages.h"
28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h" 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h"
29 #include "ui/base/keycodes/keyboard_codes.h" 29 #include "ui/base/keycodes/keyboard_codes.h"
30 #include "webkit/glue/webcursor.h" 30 #include "webkit/glue/webcursor.h"
31 #include "webkit/glue/webpreferences.h"
31 #include "webkit/plugins/npapi/webplugin.h" 32 #include "webkit/plugins/npapi/webplugin.h"
32 33
33 using base::Time; 34 using base::Time;
34 using base::TimeDelta; 35 using base::TimeDelta;
35 using base::TimeTicks; 36 using base::TimeTicks;
36 37
37 using WebKit::WebGestureEvent; 38 using WebKit::WebGestureEvent;
38 using WebKit::WebInputEvent; 39 using WebKit::WebInputEvent;
39 using WebKit::WebKeyboardEvent; 40 using WebKit::WebKeyboardEvent;
40 using WebKit::WebMouseEvent; 41 using WebKit::WebMouseEvent;
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 } 1279 }
1279 1280
1280 void RenderWidgetHost::DisableScrollbarsForThreshold(const gfx::Size& size) { 1281 void RenderWidgetHost::DisableScrollbarsForThreshold(const gfx::Size& size) {
1281 Send(new ViewMsg_DisableScrollbarsForSmallWindows(routing_id(), size)); 1282 Send(new ViewMsg_DisableScrollbarsForSmallWindows(routing_id(), size));
1282 } 1283 }
1283 1284
1284 void RenderWidgetHost::EnablePreferredSizeMode(int flags) { 1285 void RenderWidgetHost::EnablePreferredSizeMode(int flags) {
1285 Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id(), flags)); 1286 Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id(), flags));
1286 } 1287 }
1287 1288
1289 void RenderWidgetHost::SetBackground(const SkBitmap& background) {
1290 Send(new ViewMsg_SetBackground(routing_id(), background));
1291 }
1292
1293 void RenderWidgetHost::SetEditCommandsForNextKeyEvent(
1294 const std::vector<EditCommand>& commands) {
1295 Send(new ViewMsg_SetEditCommandsForNextKeyEvent(routing_id(), commands));
1296 }
1297
1298 void RenderWidgetHost::AccessibilityDoDefaultAction(int object_id) {
1299 Send(new ViewMsg_AccessibilityDoDefaultAction(routing_id(), object_id));
1300 }
1301
1302 void RenderWidgetHost::AccessibilitySetFocus(int object_id) {
1303 Send(new ViewMsg_SetAccessibilityFocus(routing_id(), object_id));
1304 }
1305
1306 void RenderWidgetHost::ExecuteEditCommand(const std::string& command,
1307 const std::string& value) {
1308 Send(new ViewMsg_ExecuteEditCommand(routing_id(), command, value));
1309 }
1310
1311 void RenderWidgetHost::ScrollFocusedEditableNodeIntoRect(
1312 const gfx::Rect& rect) {
1313 Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(routing_id(), rect));
1314 }
1315
1316 void RenderWidgetHost::SelectRange(const gfx::Point& start,
1317 const gfx::Point& end) {
1318 Send(new ViewMsg_SelectRange(routing_id(), start, end));
1319 }
1320
1321 void RenderWidgetHost::Undo() {
1322 Send(new ViewMsg_Undo(routing_id()));
1323 UserMetrics::RecordAction(UserMetricsAction("Undo"));
1324 }
1325
1326 void RenderWidgetHost::Redo() {
1327 Send(new ViewMsg_Redo(routing_id()));
1328 UserMetrics::RecordAction(UserMetricsAction("Redo"));
1329 }
1330
1331 void RenderWidgetHost::Cut() {
1332 Send(new ViewMsg_Cut(routing_id()));
1333 UserMetrics::RecordAction(UserMetricsAction("Cut"));
1334 }
1335
1336 void RenderWidgetHost::Copy() {
1337 Send(new ViewMsg_Copy(routing_id()));
1338 UserMetrics::RecordAction(UserMetricsAction("Copy"));
1339 }
1340
1341 void RenderWidgetHost::CopyToFindPboard() {
1342 #if defined(OS_MACOSX)
1343 // Windows/Linux don't have the concept of a find pasteboard.
1344 Send(new ViewMsg_CopyToFindPboard(routing_id()));
1345 UserMetrics::RecordAction(UserMetricsAction("CopyToFindPboard"));
1346 #endif
1347 }
1348
1349 void RenderWidgetHost::Paste() {
1350 Send(new ViewMsg_Paste(routing_id()));
1351 UserMetrics::RecordAction(UserMetricsAction("Paste"));
1352 }
1353
1354 void RenderWidgetHost::Delete() {
1355 Send(new ViewMsg_Delete(routing_id()));
1356 UserMetrics::RecordAction(UserMetricsAction("DeleteSelection"));
1357 }
1358
1359 void RenderWidgetHost::SelectAll() {
1360 Send(new ViewMsg_SelectAll(routing_id()));
1361 UserMetrics::RecordAction(UserMetricsAction("SelectAll"));
1362 }
1363
1364 void RenderWidgetHost::SetZoomLevel(double level) {
1365 Send(new ViewMsg_SetZoomLevel(routing_id(), level));
1366 }
1367
1368 #if defined(OS_MACOSX)
1369 void RenderWidgetHost::NotifyPluginImeCompletion(int plugin_id,
1370 const string16& status) {
1371 Send(new ViewMsg_PluginImeCompositionCompleted(routing_id(), status,
1372 plugin_id));
1373 }
1374
1375 void RenderWidgetHost::SetActive(bool active) {
1376 Send(new ViewMsg_SetActive(routing_id(), active));
1377 }
1378
1379 void RenderWidgetHost::SetWindowVisibility(bool visible) {
1380 Send(new ViewMsg_SetWindowVisibility(routing_id(), visible));
1381 }
1382
1383 void RenderWidgetHost::NotifyWindowFrameChanged(
1384 const gfx::Rect& window_frame, const gfx::Rect& content_view_frame) {
1385 Send(new ViewMsg_WindowFrameChanged(routing_id(), window_frame,
1386 content_view_frame));
1387 }
1388
1389 void RenderWidgetHost::NotifyInLiveResize(bool resize) {
1390 Send(new ViewMsg_SetInLiveResize(routing_id(), resize));
1391 }
1392
1393 #endif // (OS_MACOSX)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698