| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h" | 75 #include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h" |
| 76 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" | 76 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" |
| 77 #include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h" | 77 #include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h" |
| 78 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" | 78 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" |
| 79 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" | 79 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" |
| 80 #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" | 80 #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" |
| 81 #include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h" | 81 #include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h" |
| 82 #include "third_party/WebKit/WebKit/chromium/public/WebFormElement.h" | 82 #include "third_party/WebKit/WebKit/chromium/public/WebFormElement.h" |
| 83 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 83 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| 84 #include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" | 84 #include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" |
| 85 #include "third_party/WebKit/WebKit/chromium/public/WebImage.h" | |
| 86 #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" | 85 #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" |
| 87 #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" | 86 #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" |
| 88 #include "third_party/WebKit/WebKit/chromium/public/WebNodeList.h" | 87 #include "third_party/WebKit/WebKit/chromium/public/WebNodeList.h" |
| 89 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializer.h" | 88 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializer.h" |
| 90 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" | 89 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" |
| 91 #include "third_party/WebKit/WebKit/chromium/public/WebRange.h" | 90 #include "third_party/WebKit/WebKit/chromium/public/WebRange.h" |
| 92 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" | 91 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" |
| 93 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" | 92 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" |
| 94 #include "third_party/WebKit/WebKit/chromium/public/WebSearchableFormData.h" | 93 #include "third_party/WebKit/WebKit/chromium/public/WebSearchableFormData.h" |
| 95 #include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" | 94 #include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 using WebKit::WebDevToolsAgent; | 148 using WebKit::WebDevToolsAgent; |
| 150 using WebKit::WebDocument; | 149 using WebKit::WebDocument; |
| 151 using WebKit::WebDragData; | 150 using WebKit::WebDragData; |
| 152 using WebKit::WebDragOperation; | 151 using WebKit::WebDragOperation; |
| 153 using WebKit::WebDragOperationsMask; | 152 using WebKit::WebDragOperationsMask; |
| 154 using WebKit::WebEditingAction; | 153 using WebKit::WebEditingAction; |
| 155 using WebKit::WebFindOptions; | 154 using WebKit::WebFindOptions; |
| 156 using WebKit::WebFormElement; | 155 using WebKit::WebFormElement; |
| 157 using WebKit::WebFrame; | 156 using WebKit::WebFrame; |
| 158 using WebKit::WebHistoryItem; | 157 using WebKit::WebHistoryItem; |
| 159 using WebKit::WebImage; | |
| 160 using WebKit::WebInputElement; | 158 using WebKit::WebInputElement; |
| 161 using WebKit::WebMediaPlayer; | 159 using WebKit::WebMediaPlayer; |
| 162 using WebKit::WebMediaPlayerAction; | 160 using WebKit::WebMediaPlayerAction; |
| 163 using WebKit::WebMediaPlayerClient; | 161 using WebKit::WebMediaPlayerClient; |
| 164 using WebKit::WebNavigationPolicy; | 162 using WebKit::WebNavigationPolicy; |
| 165 using WebKit::WebNavigationType; | 163 using WebKit::WebNavigationType; |
| 166 using WebKit::WebNode; | 164 using WebKit::WebNode; |
| 167 using WebKit::WebPageSerializer; | 165 using WebKit::WebPageSerializer; |
| 168 using WebKit::WebPageSerializerClient; | 166 using WebKit::WebPageSerializerClient; |
| 169 using WebKit::WebPlugin; | 167 using WebKit::WebPlugin; |
| (...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1901 void RenderView::setKeyboardFocusURL(const WebURL& url) { | 1899 void RenderView::setKeyboardFocusURL(const WebURL& url) { |
| 1902 focus_url_ = GURL(url); | 1900 focus_url_ = GURL(url); |
| 1903 UpdateTargetURL(focus_url_, mouse_over_url_); | 1901 UpdateTargetURL(focus_url_, mouse_over_url_); |
| 1904 } | 1902 } |
| 1905 | 1903 |
| 1906 void RenderView::setToolTipText(const WebString& text, WebTextDirection hint) { | 1904 void RenderView::setToolTipText(const WebString& text, WebTextDirection hint) { |
| 1907 Send(new ViewHostMsg_SetTooltipText(routing_id_, UTF16ToWideHack(text), | 1905 Send(new ViewHostMsg_SetTooltipText(routing_id_, UTF16ToWideHack(text), |
| 1908 hint)); | 1906 hint)); |
| 1909 } | 1907 } |
| 1910 | 1908 |
| 1911 void RenderView::startDragging(const WebKit::WebDragData& data, | 1909 void RenderView::startDragging(const WebPoint& from, const WebDragData& data, |
| 1912 WebKit::WebDragOperationsMask mask) { | 1910 WebDragOperationsMask allowed_ops) { |
| 1913 startDragging(data, mask, WebImage(), WebPoint()); | |
| 1914 } | |
| 1915 | |
| 1916 void RenderView::startDragging(const WebDragData& data, | |
| 1917 WebDragOperationsMask mask, | |
| 1918 const WebImage& image, | |
| 1919 const WebPoint& imageOffset) { | |
| 1920 #if WEBKIT_USING_SKIA | |
| 1921 SkBitmap bitmap(image.getSkBitmap()); | |
| 1922 #elif WEBKIT_USING_CG | |
| 1923 // Needs implementing: http://crbug.com/11457 | |
| 1924 SkBitmap bitmap; | |
| 1925 #endif | |
| 1926 | |
| 1927 Send(new ViewHostMsg_StartDragging(routing_id_, | 1911 Send(new ViewHostMsg_StartDragging(routing_id_, |
| 1928 WebDropData(data), | 1912 WebDropData(data), |
| 1929 mask, | 1913 allowed_ops)); |
| 1930 bitmap, | |
| 1931 imageOffset)); | |
| 1932 } | 1914 } |
| 1933 | 1915 |
| 1934 bool RenderView::acceptsLoadDrops() { | 1916 bool RenderView::acceptsLoadDrops() { |
| 1935 return renderer_preferences_.can_accept_load_drops; | 1917 return renderer_preferences_.can_accept_load_drops; |
| 1936 } | 1918 } |
| 1937 | 1919 |
| 1938 void RenderView::focusNext() { | 1920 void RenderView::focusNext() { |
| 1939 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); | 1921 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); |
| 1940 } | 1922 } |
| 1941 | 1923 |
| (...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4695 gfx::PluginWindowHandle window) { | 4677 gfx::PluginWindowHandle window) { |
| 4696 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window)); | 4678 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window)); |
| 4697 } | 4679 } |
| 4698 #endif | 4680 #endif |
| 4699 | 4681 |
| 4700 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { | 4682 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { |
| 4701 if (!geolocation_dispatcher_.get()) | 4683 if (!geolocation_dispatcher_.get()) |
| 4702 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); | 4684 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); |
| 4703 return geolocation_dispatcher_.get(); | 4685 return geolocation_dispatcher_.get(); |
| 4704 } | 4686 } |
| OLD | NEW |