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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1561 GURL url; | 1561 GURL url; |
1562 if (webview()->mainFrame()) | 1562 if (webview()->mainFrame()) |
1563 url = GURL(webview()->mainFrame()->document().url()); | 1563 url = GURL(webview()->mainFrame()->document().url()); |
1564 | 1564 |
1565 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; | 1565 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; |
1566 if (direct) | 1566 if (direct) |
1567 swap_client = AsWeakPtr(); | 1567 swap_client = AsWeakPtr(); |
1568 | 1568 |
1569 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 1569 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
1570 new WebGraphicsContext3DCommandBufferImpl( | 1570 new WebGraphicsContext3DCommandBufferImpl( |
1571 surface, url, swap_client)); | 1571 surface, url, RenderThreadImpl::current(), swap_client)); |
1572 | 1572 |
1573 if (!context->Initialize(attributes)) | 1573 if (!context->Initialize(attributes)) |
1574 return NULL; | 1574 return NULL; |
1575 return context.release(); | 1575 return context.release(); |
1576 } | 1576 } |
1577 } | 1577 } |
1578 | 1578 |
1579 void RenderViewImpl::didAddMessageToConsole( | 1579 void RenderViewImpl::didAddMessageToConsole( |
1580 const WebConsoleMessage& message, const WebString& source_name, | 1580 const WebConsoleMessage& message, const WebString& source_name, |
1581 unsigned source_line) { | 1581 unsigned source_line) { |
(...skipping 3535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5117 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5117 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5118 return !!RenderThreadImpl::current()->compositor_thread(); | 5118 return !!RenderThreadImpl::current()->compositor_thread(); |
5119 } | 5119 } |
5120 | 5120 |
5121 void RenderViewImpl::OnJavaBridgeInit() { | 5121 void RenderViewImpl::OnJavaBridgeInit() { |
5122 DCHECK(!java_bridge_dispatcher_.get()); | 5122 DCHECK(!java_bridge_dispatcher_.get()); |
5123 #if defined(ENABLE_JAVA_BRIDGE) | 5123 #if defined(ENABLE_JAVA_BRIDGE) |
5124 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5124 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5125 #endif | 5125 #endif |
5126 } | 5126 } |
OLD | NEW |