| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 #include "webkit/glue/webdropdata.h" | 121 #include "webkit/glue/webdropdata.h" |
| 122 #include "webkit/glue/webkit_glue.h" | 122 #include "webkit/glue/webkit_glue.h" |
| 123 #include "webkit/glue/webmediaplayer_impl.h" | 123 #include "webkit/glue/webmediaplayer_impl.h" |
| 124 | 124 |
| 125 #if defined(OS_WIN) | 125 #if defined(OS_WIN) |
| 126 // TODO(port): these files are currently Windows only because they concern: | 126 // TODO(port): these files are currently Windows only because they concern: |
| 127 // * theming | 127 // * theming |
| 128 #include "gfx/native_theme_win.h" | 128 #include "gfx/native_theme_win.h" |
| 129 #elif defined(USE_X11) | 129 #elif defined(USE_X11) |
| 130 #include "third_party/WebKit/WebKit/chromium/public/linux/WebRenderTheme.h" | 130 #include "third_party/WebKit/WebKit/chromium/public/linux/WebRenderTheme.h" |
| 131 #elif defined(OS_MACOSX) |
| 132 #include "skia/ext/skia_utils_mac.h" |
| 131 #endif | 133 #endif |
| 132 | 134 |
| 133 using appcache::WebApplicationCacheHostImpl; | 135 using appcache::WebApplicationCacheHostImpl; |
| 134 using base::Time; | 136 using base::Time; |
| 135 using base::TimeDelta; | 137 using base::TimeDelta; |
| 136 using webkit_glue::AltErrorPageResourceFetcher; | 138 using webkit_glue::AltErrorPageResourceFetcher; |
| 137 using webkit_glue::FormData; | 139 using webkit_glue::FormData; |
| 138 using webkit_glue::FormField; | 140 using webkit_glue::FormField; |
| 139 using webkit_glue::ImageResourceFetcher; | 141 using webkit_glue::ImageResourceFetcher; |
| 140 using webkit_glue::PasswordForm; | 142 using webkit_glue::PasswordForm; |
| (...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 startDragging(data, allowed_ops, WebImage(), WebPoint()); | 1900 startDragging(data, allowed_ops, WebImage(), WebPoint()); |
| 1899 } | 1901 } |
| 1900 | 1902 |
| 1901 void RenderView::startDragging(const WebDragData& data, | 1903 void RenderView::startDragging(const WebDragData& data, |
| 1902 WebDragOperationsMask mask, | 1904 WebDragOperationsMask mask, |
| 1903 const WebImage& image, | 1905 const WebImage& image, |
| 1904 const WebPoint& imageOffset) { | 1906 const WebPoint& imageOffset) { |
| 1905 #if WEBKIT_USING_SKIA | 1907 #if WEBKIT_USING_SKIA |
| 1906 SkBitmap bitmap(image.getSkBitmap()); | 1908 SkBitmap bitmap(image.getSkBitmap()); |
| 1907 #elif WEBKIT_USING_CG | 1909 #elif WEBKIT_USING_CG |
| 1908 // Needs implementing: http://crbug.com/11457 | 1910 SkBitmap bitmap = gfx::CGImageToSkBitmap(image.getCGImageRef()); |
| 1909 SkBitmap bitmap; | |
| 1910 #endif | 1911 #endif |
| 1911 | 1912 |
| 1912 Send(new ViewHostMsg_StartDragging(routing_id_, | 1913 Send(new ViewHostMsg_StartDragging(routing_id_, |
| 1913 WebDropData(data), | 1914 WebDropData(data), |
| 1914 mask, | 1915 mask, |
| 1915 bitmap, | 1916 bitmap, |
| 1916 imageOffset)); | 1917 imageOffset)); |
| 1917 } | 1918 } |
| 1918 | 1919 |
| 1919 bool RenderView::acceptsLoadDrops() { | 1920 bool RenderView::acceptsLoadDrops() { |
| (...skipping 3018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4938 | 4939 |
| 4939 if (last_top_level_navigation_page_id_ != page_id_ && | 4940 if (last_top_level_navigation_page_id_ != page_id_ && |
| 4940 // Not interested in reloads. | 4941 // Not interested in reloads. |
| 4941 type != WebKit::WebNavigationTypeReload && | 4942 type != WebKit::WebNavigationTypeReload && |
| 4942 type != WebKit::WebNavigationTypeFormSubmitted) { | 4943 type != WebKit::WebNavigationTypeFormSubmitted) { |
| 4943 return true; | 4944 return true; |
| 4944 } | 4945 } |
| 4945 } | 4946 } |
| 4946 return false; | 4947 return false; |
| 4947 } | 4948 } |
| OLD | NEW |