OLD | NEW |
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/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" |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "content/browser/accessibility/browser_accessibility_state.h" | 15 #include "content/browser/accessibility/browser_accessibility_state.h" |
16 #include "content/browser/gpu/gpu_process_host.h" | 16 #include "content/browser/gpu/gpu_process_host.h" |
| 17 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
17 #include "content/browser/renderer_host/backing_store.h" | 18 #include "content/browser/renderer_host/backing_store.h" |
18 #include "content/browser/renderer_host/backing_store_manager.h" | 19 #include "content/browser/renderer_host/backing_store_manager.h" |
19 #include "content/browser/renderer_host/render_process_host_impl.h" | 20 #include "content/browser/renderer_host/render_process_host_impl.h" |
20 #include "content/browser/renderer_host/render_widget_helper.h" | 21 #include "content/browser/renderer_host/render_widget_helper.h" |
21 #include "content/browser/renderer_host/render_widget_host_view.h" | 22 #include "content/browser/renderer_host/render_widget_host_view.h" |
22 #include "content/browser/user_metrics.h" | 23 #include "content/browser/user_metrics.h" |
23 #include "content/common/gpu/gpu_messages.h" | 24 #include "content/common/gpu/gpu_messages.h" |
24 #include "content/public/browser/notification_service.h" | 25 #include "content/public/browser/notification_service.h" |
25 #include "content/common/view_messages.h" | 26 #include "content/common/view_messages.h" |
26 #include "content/public/browser/native_web_keyboard_event.h" | 27 #include "content/public/browser/native_web_keyboard_event.h" |
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 pending_mouse_lock_request_ = false; | 1470 pending_mouse_lock_request_ = false; |
1470 if (!view_ || !view_->HasFocus()|| !view_->LockMouse()) { | 1471 if (!view_ || !view_->HasFocus()|| !view_->LockMouse()) { |
1471 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); | 1472 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); |
1472 return false; | 1473 return false; |
1473 } else { | 1474 } else { |
1474 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); | 1475 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); |
1475 return true; | 1476 return true; |
1476 } | 1477 } |
1477 } | 1478 } |
1478 } | 1479 } |
| 1480 |
| 1481 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 1482 void RenderWidgetHost::AcknowledgeSwapBuffers(int32 route_id, int gpu_host_id) { |
| 1483 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
| 1484 if (ui_shim) |
| 1485 ui_shim->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id)); |
| 1486 } |
| 1487 #endif |
OLD | NEW |