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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 using WebKit::WebDataSource; | 148 using WebKit::WebDataSource; |
148 using WebKit::WebDevToolsAgent; | 149 using WebKit::WebDevToolsAgent; |
149 using WebKit::WebDragData; | 150 using WebKit::WebDragData; |
150 using WebKit::WebDragOperation; | 151 using WebKit::WebDragOperation; |
151 using WebKit::WebDragOperationsMask; | 152 using WebKit::WebDragOperationsMask; |
152 using WebKit::WebEditingAction; | 153 using WebKit::WebEditingAction; |
153 using WebKit::WebFindOptions; | 154 using WebKit::WebFindOptions; |
154 using WebKit::WebFormElement; | 155 using WebKit::WebFormElement; |
155 using WebKit::WebFrame; | 156 using WebKit::WebFrame; |
156 using WebKit::WebHistoryItem; | 157 using WebKit::WebHistoryItem; |
| 158 using WebKit::WebImage; |
157 using WebKit::WebInputElement; | 159 using WebKit::WebInputElement; |
158 using WebKit::WebMediaPlayer; | 160 using WebKit::WebMediaPlayer; |
159 using WebKit::WebMediaPlayerAction; | 161 using WebKit::WebMediaPlayerAction; |
160 using WebKit::WebMediaPlayerClient; | 162 using WebKit::WebMediaPlayerClient; |
161 using WebKit::WebNavigationPolicy; | 163 using WebKit::WebNavigationPolicy; |
162 using WebKit::WebNavigationType; | 164 using WebKit::WebNavigationType; |
163 using WebKit::WebNode; | 165 using WebKit::WebNode; |
164 using WebKit::WebPageSerializer; | 166 using WebKit::WebPageSerializer; |
165 using WebKit::WebPageSerializerClient; | 167 using WebKit::WebPageSerializerClient; |
166 using WebKit::WebPlugin; | 168 using WebKit::WebPlugin; |
(...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1881 void RenderView::setKeyboardFocusURL(const WebURL& url) { | 1883 void RenderView::setKeyboardFocusURL(const WebURL& url) { |
1882 focus_url_ = GURL(url); | 1884 focus_url_ = GURL(url); |
1883 UpdateTargetURL(focus_url_, mouse_over_url_); | 1885 UpdateTargetURL(focus_url_, mouse_over_url_); |
1884 } | 1886 } |
1885 | 1887 |
1886 void RenderView::setToolTipText(const WebString& text, WebTextDirection hint) { | 1888 void RenderView::setToolTipText(const WebString& text, WebTextDirection hint) { |
1887 Send(new ViewHostMsg_SetTooltipText(routing_id_, UTF16ToWideHack(text), | 1889 Send(new ViewHostMsg_SetTooltipText(routing_id_, UTF16ToWideHack(text), |
1888 hint)); | 1890 hint)); |
1889 } | 1891 } |
1890 | 1892 |
1891 void RenderView::startDragging(const WebPoint& from, const WebDragData& data, | 1893 void RenderView::startDragging(const WebKit::WebDragData& data, |
1892 WebDragOperationsMask allowed_ops) { | 1894 WebKit::WebDragOperationsMask mask) { |
| 1895 startDragging(data, mask, WebImage(), WebPoint()); |
| 1896 } |
| 1897 |
| 1898 void RenderView::startDragging(const WebDragData& data, |
| 1899 WebDragOperationsMask mask, |
| 1900 const WebImage& image, |
| 1901 const WebPoint& imageOffset) { |
| 1902 #if WEBKIT_USING_SKIA |
| 1903 SkBitmap bitmap(image.getSkBitmap()); |
| 1904 #elif WEBKIT_USING_CG |
| 1905 // Needs implementing: http://crbug.com/11457 |
| 1906 SkBitmap bitmap(); |
| 1907 #endif |
| 1908 |
1893 Send(new ViewHostMsg_StartDragging(routing_id_, | 1909 Send(new ViewHostMsg_StartDragging(routing_id_, |
1894 WebDropData(data), | 1910 WebDropData(data), |
1895 allowed_ops)); | 1911 mask, |
| 1912 bitmap, |
| 1913 imageOffset)); |
1896 } | 1914 } |
1897 | 1915 |
1898 bool RenderView::acceptsLoadDrops() { | 1916 bool RenderView::acceptsLoadDrops() { |
1899 return renderer_preferences_.can_accept_load_drops; | 1917 return renderer_preferences_.can_accept_load_drops; |
1900 } | 1918 } |
1901 | 1919 |
1902 void RenderView::focusNext() { | 1920 void RenderView::focusNext() { |
1903 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); | 1921 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); |
1904 } | 1922 } |
1905 | 1923 |
(...skipping 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4632 void RenderView::GPUPluginBuffersSwapped(gfx::PluginWindowHandle window) { | 4650 void RenderView::GPUPluginBuffersSwapped(gfx::PluginWindowHandle window) { |
4633 Send(new ViewHostMsg_GPUPluginBuffersSwapped(routing_id(), window)); | 4651 Send(new ViewHostMsg_GPUPluginBuffersSwapped(routing_id(), window)); |
4634 } | 4652 } |
4635 #endif | 4653 #endif |
4636 | 4654 |
4637 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { | 4655 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { |
4638 if (!geolocation_dispatcher_.get()) | 4656 if (!geolocation_dispatcher_.get()) |
4639 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); | 4657 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); |
4640 return geolocation_dispatcher_.get(); | 4658 return geolocation_dispatcher_.get(); |
4641 } | 4659 } |
OLD | NEW |