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/bind.h" | 7 #include "base/bind.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/logging.h" | 10 #include "base/logging.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 40 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHelperPlugin.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHelperPlugin.h" |
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPagePopup.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPagePopup.h" |
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" |
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" | 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" |
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" | 46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" |
47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
48 #include "third_party/skia/include/core/SkShader.h" | 48 #include "third_party/skia/include/core/SkShader.h" |
49 #include "ui/base/ui_base_switches.h" | 49 #include "ui/base/ui_base_switches.h" |
| 50 #include "ui/gfx/point.h" |
50 #include "ui/gfx/rect_conversions.h" | 51 #include "ui/gfx/rect_conversions.h" |
51 #include "ui/gfx/size_conversions.h" | 52 #include "ui/gfx/size_conversions.h" |
52 #include "ui/gfx/skia_util.h" | 53 #include "ui/gfx/skia_util.h" |
53 #include "ui/gl/gl_switches.h" | 54 #include "ui/gl/gl_switches.h" |
54 #include "ui/surface/transport_dib.h" | 55 #include "ui/surface/transport_dib.h" |
55 #include "webkit/compositor_bindings/web_rendering_stats_impl.h" | 56 #include "webkit/compositor_bindings/web_rendering_stats_impl.h" |
56 #include "webkit/glue/webkit_glue.h" | 57 #include "webkit/glue/webkit_glue.h" |
57 #include "webkit/plugins/npapi/webplugin.h" | 58 #include "webkit/plugins/npapi/webplugin.h" |
58 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 59 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
59 | 60 |
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 return; | 1563 return; |
1563 | 1564 |
1564 did_show_ = true; | 1565 did_show_ = true; |
1565 // NOTE: initial_pos_ may still have its default values at this point, but | 1566 // NOTE: initial_pos_ may still have its default values at this point, but |
1566 // that's okay. It'll be ignored if as_popup is false, or the browser | 1567 // that's okay. It'll be ignored if as_popup is false, or the browser |
1567 // process will impose a default position otherwise. | 1568 // process will impose a default position otherwise. |
1568 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); | 1569 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); |
1569 SetPendingWindowRect(initial_pos_); | 1570 SetPendingWindowRect(initial_pos_); |
1570 } | 1571 } |
1571 | 1572 |
| 1573 void RenderWidget::didProgrammaticallyScroll( |
| 1574 const WebKit::WebPoint& scrollPoint) { |
| 1575 if (!compositor_) |
| 1576 return; |
| 1577 Send(new ViewHostMsg_DidProgrammaticallyScroll( |
| 1578 routing_id_, gfx::Point(scrollPoint.x, scrollPoint.y))); |
| 1579 } |
| 1580 |
1572 void RenderWidget::didFocus() { | 1581 void RenderWidget::didFocus() { |
1573 } | 1582 } |
1574 | 1583 |
1575 void RenderWidget::didBlur() { | 1584 void RenderWidget::didBlur() { |
1576 } | 1585 } |
1577 | 1586 |
1578 void RenderWidget::DoDeferredClose() { | 1587 void RenderWidget::DoDeferredClose() { |
1579 Send(new ViewHostMsg_Close(routing_id_)); | 1588 Send(new ViewHostMsg_Close(routing_id_)); |
1580 } | 1589 } |
1581 | 1590 |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2310 | 2319 |
2311 if (!context->Initialize( | 2320 if (!context->Initialize( |
2312 attributes, | 2321 attributes, |
2313 false /* bind generates resources */, | 2322 false /* bind generates resources */, |
2314 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) | 2323 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) |
2315 return NULL; | 2324 return NULL; |
2316 return context.release(); | 2325 return context.release(); |
2317 } | 2326 } |
2318 | 2327 |
2319 } // namespace content | 2328 } // namespace content |
OLD | NEW |