| 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 "chrome/renderer/chrome_render_view_observer.h" | 5 #include "chrome/renderer/chrome_render_view_observer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 base::TimeDelta::FromMilliseconds(kDelayForForcedCaptureMs)); | 824 base::TimeDelta::FromMilliseconds(kDelayForForcedCaptureMs)); |
| 825 } | 825 } |
| 826 | 826 |
| 827 void ChromeRenderViewObserver::DidClearWindowObject(WebFrame* frame) { | 827 void ChromeRenderViewObserver::DidClearWindowObject(WebFrame* frame) { |
| 828 if (render_view()->GetEnabledBindings() & | 828 if (render_view()->GetEnabledBindings() & |
| 829 content::BINDINGS_POLICY_EXTERNAL_HOST) { | 829 content::BINDINGS_POLICY_EXTERNAL_HOST) { |
| 830 GetExternalHostBindings()->BindToJavascript(frame, "externalHost"); | 830 GetExternalHostBindings()->BindToJavascript(frame, "externalHost"); |
| 831 } | 831 } |
| 832 } | 832 } |
| 833 | 833 |
| 834 void ChromeRenderViewObserver::DidHandleGestureEvent( | |
| 835 const WebGestureEvent& event) { | |
| 836 if (event.type != WebKit::WebGestureEvent::GestureTap) | |
| 837 return; | |
| 838 | |
| 839 WebKit::WebTextInputType text_input_type = | |
| 840 render_view()->GetWebView()->textInputInfo().type; | |
| 841 | |
| 842 render_view()->Send(new ChromeViewHostMsg_FocusedNodeTouched( | |
| 843 routing_id(), | |
| 844 text_input_type != WebKit::WebTextInputTypeNone)); | |
| 845 } | |
| 846 | |
| 847 void ChromeRenderViewObserver::DetailedConsoleMessageAdded( | 834 void ChromeRenderViewObserver::DetailedConsoleMessageAdded( |
| 848 const base::string16& message, | 835 const base::string16& message, |
| 849 const base::string16& source, | 836 const base::string16& source, |
| 850 const base::string16& stack_trace_string, | 837 const base::string16& stack_trace_string, |
| 851 int32 line_number, | 838 int32 line_number, |
| 852 int32 severity_level) { | 839 int32 severity_level) { |
| 853 string16 trimmed_message = message; | 840 string16 trimmed_message = message; |
| 854 extensions::StackTrace stack_trace = GetStackTraceFromMessage( | 841 extensions::StackTrace stack_trace = GetStackTraceFromMessage( |
| 855 &trimmed_message, | 842 &trimmed_message, |
| 856 source, | 843 source, |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 WebElement element = node.to<WebElement>(); | 1019 WebElement element = node.to<WebElement>(); |
| 1033 if (!element.hasTagName(tag_name)) | 1020 if (!element.hasTagName(tag_name)) |
| 1034 continue; | 1021 continue; |
| 1035 WebString value = element.getAttribute(attribute_name); | 1022 WebString value = element.getAttribute(attribute_name); |
| 1036 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh")) | 1023 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh")) |
| 1037 continue; | 1024 continue; |
| 1038 return true; | 1025 return true; |
| 1039 } | 1026 } |
| 1040 return false; | 1027 return false; |
| 1041 } | 1028 } |
| OLD | NEW |