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 30 matching lines...) Expand all Loading... |
41 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 41 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHelperPlugin.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHelperPlugin.h" |
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPagePopup.h" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPagePopup.h" |
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" | 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" |
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" | 46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" |
47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" | 47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" |
48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
49 #include "third_party/skia/include/core/SkShader.h" | 49 #include "third_party/skia/include/core/SkShader.h" |
50 #include "ui/base/ui_base_switches.h" | 50 #include "ui/base/ui_base_switches.h" |
| 51 #include "ui/gfx/point.h" |
51 #include "ui/gfx/rect_conversions.h" | 52 #include "ui/gfx/rect_conversions.h" |
52 #include "ui/gfx/size_conversions.h" | 53 #include "ui/gfx/size_conversions.h" |
53 #include "ui/gfx/skia_util.h" | 54 #include "ui/gfx/skia_util.h" |
54 #include "ui/gl/gl_switches.h" | 55 #include "ui/gl/gl_switches.h" |
55 #include "ui/surface/transport_dib.h" | 56 #include "ui/surface/transport_dib.h" |
56 #include "webkit/compositor_bindings/web_rendering_stats_impl.h" | 57 #include "webkit/compositor_bindings/web_rendering_stats_impl.h" |
57 #include "webkit/glue/webkit_glue.h" | 58 #include "webkit/glue/webkit_glue.h" |
58 #include "webkit/plugins/npapi/webplugin.h" | 59 #include "webkit/plugins/npapi/webplugin.h" |
59 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 60 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
60 | 61 |
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 return; | 1598 return; |
1598 | 1599 |
1599 did_show_ = true; | 1600 did_show_ = true; |
1600 // NOTE: initial_pos_ may still have its default values at this point, but | 1601 // NOTE: initial_pos_ may still have its default values at this point, but |
1601 // that's okay. It'll be ignored if as_popup is false, or the browser | 1602 // that's okay. It'll be ignored if as_popup is false, or the browser |
1602 // process will impose a default position otherwise. | 1603 // process will impose a default position otherwise. |
1603 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); | 1604 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); |
1604 SetPendingWindowRect(initial_pos_); | 1605 SetPendingWindowRect(initial_pos_); |
1605 } | 1606 } |
1606 | 1607 |
| 1608 void RenderWidget::didProgrammaticallyScroll( |
| 1609 const WebKit::WebPoint& scrollPoint) { |
| 1610 if (!compositor_) |
| 1611 return; |
| 1612 Send(new ViewHostMsg_DidProgrammaticallyScroll( |
| 1613 routing_id_, gfx::Vector2d(scrollPoint.x, scrollPoint.y))); |
| 1614 } |
| 1615 |
1607 void RenderWidget::didFocus() { | 1616 void RenderWidget::didFocus() { |
1608 } | 1617 } |
1609 | 1618 |
1610 void RenderWidget::didBlur() { | 1619 void RenderWidget::didBlur() { |
1611 } | 1620 } |
1612 | 1621 |
1613 void RenderWidget::DoDeferredClose() { | 1622 void RenderWidget::DoDeferredClose() { |
1614 Send(new ViewHostMsg_Close(routing_id_)); | 1623 Send(new ViewHostMsg_Close(routing_id_)); |
1615 } | 1624 } |
1616 | 1625 |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2346 | 2355 |
2347 if (!context->Initialize( | 2356 if (!context->Initialize( |
2348 attributes, | 2357 attributes, |
2349 false /* bind generates resources */, | 2358 false /* bind generates resources */, |
2350 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) | 2359 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) |
2351 return NULL; | 2360 return NULL; |
2352 return context.release(); | 2361 return context.release(); |
2353 } | 2362 } |
2354 | 2363 |
2355 } // namespace content | 2364 } // namespace content |
OLD | NEW |