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 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1593 return; | 1594 return; |
1594 | 1595 |
1595 did_show_ = true; | 1596 did_show_ = true; |
1596 // NOTE: initial_pos_ may still have its default values at this point, but | 1597 // NOTE: initial_pos_ may still have its default values at this point, but |
1597 // that's okay. It'll be ignored if as_popup is false, or the browser | 1598 // that's okay. It'll be ignored if as_popup is false, or the browser |
1598 // process will impose a default position otherwise. | 1599 // process will impose a default position otherwise. |
1599 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); | 1600 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); |
1600 SetPendingWindowRect(initial_pos_); | 1601 SetPendingWindowRect(initial_pos_); |
1601 } | 1602 } |
1602 | 1603 |
1604 void RenderWidget::didProgrammaticallyScroll( | |
1605 const WebKit::WebPoint& scrollPoint) { | |
1606 if (!compositor_) | |
1607 return; | |
1608 Send(new ViewHostMsg_DidProgrammaticallyScroll( | |
1609 routing_id_, gfx::Vector2d(scrollPoint.x, scrollPoint.y))); | |
jamesr
2013/05/08 17:31:16
bad alignment
Michael van Ouwerkerk
2013/05/13 13:27:18
Done.
| |
1610 } | |
1611 | |
1603 void RenderWidget::didFocus() { | 1612 void RenderWidget::didFocus() { |
1604 } | 1613 } |
1605 | 1614 |
1606 void RenderWidget::didBlur() { | 1615 void RenderWidget::didBlur() { |
1607 } | 1616 } |
1608 | 1617 |
1609 void RenderWidget::DoDeferredClose() { | 1618 void RenderWidget::DoDeferredClose() { |
1610 Send(new ViewHostMsg_Close(routing_id_)); | 1619 Send(new ViewHostMsg_Close(routing_id_)); |
1611 } | 1620 } |
1612 | 1621 |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2340 | 2349 |
2341 if (!context->Initialize( | 2350 if (!context->Initialize( |
2342 attributes, | 2351 attributes, |
2343 false /* bind generates resources */, | 2352 false /* bind generates resources */, |
2344 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) | 2353 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) |
2345 return NULL; | 2354 return NULL; |
2346 return context.release(); | 2355 return context.release(); |
2347 } | 2356 } |
2348 | 2357 |
2349 } // namespace content | 2358 } // namespace content |
OLD | NEW |