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 3923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3934 WebString::fromUTF8(css), | 3934 WebString::fromUTF8(css), |
3935 WebDocument::UserStyleAuthorLevel); | 3935 WebDocument::UserStyleAuthorLevel); |
3936 } | 3936 } |
3937 | 3937 |
3938 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { | 3938 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { |
3939 enabled_bindings_ |= enabled_bindings_flags; | 3939 enabled_bindings_ |= enabled_bindings_flags; |
3940 } | 3940 } |
3941 | 3941 |
3942 void RenderViewImpl::OnSetWebUIProperty(const std::string& name, | 3942 void RenderViewImpl::OnSetWebUIProperty(const std::string& name, |
3943 const std::string& value) { | 3943 const std::string& value) { |
3944 DCHECK(enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI); | 3944 if (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) |
3945 GetWebUIBindings()->SetProperty(name, value); | 3945 GetWebUIBindings()->SetProperty(name, value); |
| 3946 else |
| 3947 NOTREACHED() << "WebUI bindings not enabled."; |
3946 } | 3948 } |
3947 | 3949 |
3948 void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data, | 3950 void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data, |
3949 const gfx::Point& client_point, | 3951 const gfx::Point& client_point, |
3950 const gfx::Point& screen_point, | 3952 const gfx::Point& screen_point, |
3951 WebDragOperationsMask ops) { | 3953 WebDragOperationsMask ops) { |
3952 WebDragOperation operation = webview()->dragTargetDragEnter( | 3954 WebDragOperation operation = webview()->dragTargetDragEnter( |
3953 drop_data.ToDragData(), | 3955 drop_data.ToDragData(), |
3954 client_point, | 3956 client_point, |
3955 screen_point, | 3957 screen_point, |
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4980 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 4982 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
4981 return !!RenderThreadImpl::current()->compositor_thread(); | 4983 return !!RenderThreadImpl::current()->compositor_thread(); |
4982 } | 4984 } |
4983 | 4985 |
4984 void RenderViewImpl::OnJavaBridgeInit() { | 4986 void RenderViewImpl::OnJavaBridgeInit() { |
4985 DCHECK(!java_bridge_dispatcher_.get()); | 4987 DCHECK(!java_bridge_dispatcher_.get()); |
4986 #if defined(ENABLE_JAVA_BRIDGE) | 4988 #if defined(ENABLE_JAVA_BRIDGE) |
4987 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 4989 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
4988 #endif | 4990 #endif |
4989 } | 4991 } |
OLD | NEW |