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" |
85 #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" | 86 #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" |
86 #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" | 87 #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" |
87 #include "third_party/WebKit/WebKit/chromium/public/WebNodeList.h" | 88 #include "third_party/WebKit/WebKit/chromium/public/WebNodeList.h" |
88 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializer.h" | 89 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializer.h" |
89 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" | 90 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" |
90 #include "third_party/WebKit/WebKit/chromium/public/WebRange.h" | 91 #include "third_party/WebKit/WebKit/chromium/public/WebRange.h" |
91 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" | 92 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" |
92 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" | 93 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" |
93 #include "third_party/WebKit/WebKit/chromium/public/WebSearchableFormData.h" | 94 #include "third_party/WebKit/WebKit/chromium/public/WebSearchableFormData.h" |
94 #include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" | 95 #include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 using WebKit::WebDevToolsAgent; | 149 using WebKit::WebDevToolsAgent; |
149 using WebKit::WebDocument; | 150 using WebKit::WebDocument; |
150 using WebKit::WebDragData; | 151 using WebKit::WebDragData; |
151 using WebKit::WebDragOperation; | 152 using WebKit::WebDragOperation; |
152 using WebKit::WebDragOperationsMask; | 153 using WebKit::WebDragOperationsMask; |
153 using WebKit::WebEditingAction; | 154 using WebKit::WebEditingAction; |
154 using WebKit::WebFindOptions; | 155 using WebKit::WebFindOptions; |
155 using WebKit::WebFormElement; | 156 using WebKit::WebFormElement; |
156 using WebKit::WebFrame; | 157 using WebKit::WebFrame; |
157 using WebKit::WebHistoryItem; | 158 using WebKit::WebHistoryItem; |
| 159 using WebKit::WebImage; |
158 using WebKit::WebInputElement; | 160 using WebKit::WebInputElement; |
159 using WebKit::WebMediaPlayer; | 161 using WebKit::WebMediaPlayer; |
160 using WebKit::WebMediaPlayerAction; | 162 using WebKit::WebMediaPlayerAction; |
161 using WebKit::WebMediaPlayerClient; | 163 using WebKit::WebMediaPlayerClient; |
162 using WebKit::WebNavigationPolicy; | 164 using WebKit::WebNavigationPolicy; |
163 using WebKit::WebNavigationType; | 165 using WebKit::WebNavigationType; |
164 using WebKit::WebNode; | 166 using WebKit::WebNode; |
165 using WebKit::WebPageSerializer; | 167 using WebKit::WebPageSerializer; |
166 using WebKit::WebPageSerializerClient; | 168 using WebKit::WebPageSerializerClient; |
167 using WebKit::WebPlugin; | 169 using WebKit::WebPlugin; |
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 UpdateTargetURL(focus_url_, mouse_over_url_); | 1903 UpdateTargetURL(focus_url_, mouse_over_url_); |
1902 } | 1904 } |
1903 | 1905 |
1904 void RenderView::setToolTipText(const WebString& text, WebTextDirection hint) { | 1906 void RenderView::setToolTipText(const WebString& text, WebTextDirection hint) { |
1905 Send(new ViewHostMsg_SetTooltipText(routing_id_, UTF16ToWideHack(text), | 1907 Send(new ViewHostMsg_SetTooltipText(routing_id_, UTF16ToWideHack(text), |
1906 hint)); | 1908 hint)); |
1907 } | 1909 } |
1908 | 1910 |
1909 void RenderView::startDragging(const WebPoint& from, const WebDragData& data, | 1911 void RenderView::startDragging(const WebPoint& from, const WebDragData& data, |
1910 WebDragOperationsMask allowed_ops) { | 1912 WebDragOperationsMask allowed_ops) { |
| 1913 startDragging(data, allowed_ops, 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 |
1911 Send(new ViewHostMsg_StartDragging(routing_id_, | 1927 Send(new ViewHostMsg_StartDragging(routing_id_, |
1912 WebDropData(data), | 1928 WebDropData(data), |
1913 allowed_ops)); | 1929 mask, |
| 1930 bitmap, |
| 1931 imageOffset)); |
1914 } | 1932 } |
1915 | 1933 |
1916 bool RenderView::acceptsLoadDrops() { | 1934 bool RenderView::acceptsLoadDrops() { |
1917 return renderer_preferences_.can_accept_load_drops; | 1935 return renderer_preferences_.can_accept_load_drops; |
1918 } | 1936 } |
1919 | 1937 |
1920 void RenderView::focusNext() { | 1938 void RenderView::focusNext() { |
1921 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); | 1939 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); |
1922 } | 1940 } |
1923 | 1941 |
(...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4677 gfx::PluginWindowHandle window) { | 4695 gfx::PluginWindowHandle window) { |
4678 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window)); | 4696 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window)); |
4679 } | 4697 } |
4680 #endif | 4698 #endif |
4681 | 4699 |
4682 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { | 4700 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { |
4683 if (!geolocation_dispatcher_.get()) | 4701 if (!geolocation_dispatcher_.get()) |
4684 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); | 4702 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); |
4685 return geolocation_dispatcher_.get(); | 4703 return geolocation_dispatcher_.get(); |
4686 } | 4704 } |
OLD | NEW |