| 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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 return; | 1577 return; |
| 1577 | 1578 |
| 1578 did_show_ = true; | 1579 did_show_ = true; |
| 1579 // NOTE: initial_pos_ may still have its default values at this point, but | 1580 // NOTE: initial_pos_ may still have its default values at this point, but |
| 1580 // that's okay. It'll be ignored if as_popup is false, or the browser | 1581 // that's okay. It'll be ignored if as_popup is false, or the browser |
| 1581 // process will impose a default position otherwise. | 1582 // process will impose a default position otherwise. |
| 1582 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); | 1583 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); |
| 1583 SetPendingWindowRect(initial_pos_); | 1584 SetPendingWindowRect(initial_pos_); |
| 1584 } | 1585 } |
| 1585 | 1586 |
| 1587 void RenderWidget::didProgrammaticallyScroll( |
| 1588 const WebKit::WebPoint& scrollPoint) { |
| 1589 if (!compositor_) |
| 1590 return; |
| 1591 Send(new ViewHostMsg_DidProgrammaticallyScroll( |
| 1592 routing_id_, gfx::Point(scrollPoint.x, scrollPoint.y))); |
| 1593 } |
| 1594 |
| 1586 void RenderWidget::didFocus() { | 1595 void RenderWidget::didFocus() { |
| 1587 } | 1596 } |
| 1588 | 1597 |
| 1589 void RenderWidget::didBlur() { | 1598 void RenderWidget::didBlur() { |
| 1590 } | 1599 } |
| 1591 | 1600 |
| 1592 void RenderWidget::DoDeferredClose() { | 1601 void RenderWidget::DoDeferredClose() { |
| 1593 Send(new ViewHostMsg_Close(routing_id_)); | 1602 Send(new ViewHostMsg_Close(routing_id_)); |
| 1594 } | 1603 } |
| 1595 | 1604 |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2323 | 2332 |
| 2324 if (!context->Initialize( | 2333 if (!context->Initialize( |
| 2325 attributes, | 2334 attributes, |
| 2326 false /* bind generates resources */, | 2335 false /* bind generates resources */, |
| 2327 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) | 2336 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) |
| 2328 return NULL; | 2337 return NULL; |
| 2329 return context.release(); | 2338 return context.release(); |
| 2330 } | 2339 } |
| 2331 | 2340 |
| 2332 } // namespace content | 2341 } // namespace content |
| OLD | NEW |