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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 return; | 1564 return; |
1564 | 1565 |
1565 did_show_ = true; | 1566 did_show_ = true; |
1566 // NOTE: initial_pos_ may still have its default values at this point, but | 1567 // NOTE: initial_pos_ may still have its default values at this point, but |
1567 // that's okay. It'll be ignored if as_popup is false, or the browser | 1568 // that's okay. It'll be ignored if as_popup is false, or the browser |
1568 // process will impose a default position otherwise. | 1569 // process will impose a default position otherwise. |
1569 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); | 1570 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); |
1570 SetPendingWindowRect(initial_pos_); | 1571 SetPendingWindowRect(initial_pos_); |
1571 } | 1572 } |
1572 | 1573 |
| 1574 void RenderWidget::didProgrammaticallyScroll( |
| 1575 const WebKit::WebPoint& scrollPoint) { |
| 1576 if (!compositor_) |
| 1577 return; |
| 1578 Send(new ViewHostMsg_DidProgrammaticallyScroll( |
| 1579 routing_id_, gfx::Point(scrollPoint.x, scrollPoint.y))); |
| 1580 } |
| 1581 |
1573 void RenderWidget::didFocus() { | 1582 void RenderWidget::didFocus() { |
1574 } | 1583 } |
1575 | 1584 |
1576 void RenderWidget::didBlur() { | 1585 void RenderWidget::didBlur() { |
1577 } | 1586 } |
1578 | 1587 |
1579 void RenderWidget::DoDeferredClose() { | 1588 void RenderWidget::DoDeferredClose() { |
1580 Send(new ViewHostMsg_Close(routing_id_)); | 1589 Send(new ViewHostMsg_Close(routing_id_)); |
1581 } | 1590 } |
1582 | 1591 |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2315 | 2324 |
2316 if (!context->Initialize( | 2325 if (!context->Initialize( |
2317 attributes, | 2326 attributes, |
2318 false /* bind generates resources */, | 2327 false /* bind generates resources */, |
2319 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) | 2328 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) |
2320 return NULL; | 2329 return NULL; |
2321 return context.release(); | 2330 return context.release(); |
2322 } | 2331 } |
2323 | 2332 |
2324 } // namespace content | 2333 } // namespace content |
OLD | NEW |