OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "ChromiumBridge.h" | 6 #include "ChromiumBridge.h" |
7 | 7 |
8 #include "BitmapImage.h" | 8 #include "BitmapImage.h" |
9 #include "Cursor.h" | 9 #include "Cursor.h" |
10 #include "Frame.h" | 10 #include "Frame.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "SystemTime.h" | 24 #include "SystemTime.h" |
25 #include "Widget.h" | 25 #include "Widget.h" |
26 #include <wtf/CurrentTime.h> | 26 #include <wtf/CurrentTime.h> |
27 | 27 |
28 #undef LOG | 28 #undef LOG |
29 #include "base/file_util.h" | 29 #include "base/file_util.h" |
30 #include "base/string_util.h" | 30 #include "base/string_util.h" |
31 #include "build/build_config.h" | 31 #include "build/build_config.h" |
32 #include "googleurl/src/url_util.h" | 32 #include "googleurl/src/url_util.h" |
33 #include "skia/ext/skia_utils_win.h" | 33 #include "skia/ext/skia_utils_win.h" |
| 34 #include "webkit/api/public/WebCursorInfo.h" |
34 #include "webkit/api/public/WebScreenInfo.h" | 35 #include "webkit/api/public/WebScreenInfo.h" |
35 #include "webkit/glue/chrome_client_impl.h" | 36 #include "webkit/glue/chrome_client_impl.h" |
36 #include "webkit/glue/glue_util.h" | 37 #include "webkit/glue/glue_util.h" |
37 #include "webkit/glue/plugins/plugin_instance.h" | 38 #include "webkit/glue/plugins/plugin_instance.h" |
38 #include "webkit/glue/webcursor.h" | |
39 #include "webkit/glue/webkit_glue.h" | 39 #include "webkit/glue/webkit_glue.h" |
40 #include "webkit/glue/webplugin_impl.h" | 40 #include "webkit/glue/webplugin_impl.h" |
41 #include "webkit/glue/webview_impl.h" | 41 #include "webkit/glue/webview_impl.h" |
42 | 42 |
43 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
44 #include <windows.h> | 44 #include <windows.h> |
45 #include <vssym32.h> | 45 #include <vssym32.h> |
46 | |
47 #include "base/gfx/native_theme.h" | 46 #include "base/gfx/native_theme.h" |
48 #endif | 47 #endif |
49 | 48 |
| 49 using WebKit::WebCursorInfo; |
| 50 |
50 namespace { | 51 namespace { |
51 | 52 |
52 gfx::NativeViewId ToNativeId(WebCore::Widget* widget) { | 53 gfx::NativeViewId ToNativeId(WebCore::Widget* widget) { |
53 if (!widget) | 54 if (!widget) |
54 return 0; | 55 return 0; |
55 return widget->root()->hostWindow()->platformWindow(); | 56 return widget->root()->hostWindow()->platformWindow(); |
56 } | 57 } |
57 | 58 |
58 ChromeClientImpl* ToChromeClient(WebCore::Widget* widget) { | 59 ChromeClientImpl* ToChromeClient(WebCore::Widget* widget) { |
59 WebCore::FrameView* view; | 60 WebCore::FrameView* view; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 if (!view || !view->delegate()) | 170 if (!view || !view->delegate()) |
170 return IntRect(); | 171 return IntRect(); |
171 return ToIntRect(view->delegate()->GetScreenInfo(view).availableRect); | 172 return ToIntRect(view->delegate()->GetScreenInfo(view).availableRect); |
172 } | 173 } |
173 | 174 |
174 // Widget --------------------------------------------------------------------- | 175 // Widget --------------------------------------------------------------------- |
175 | 176 |
176 void ChromiumBridge::widgetSetCursor(Widget* widget, const Cursor& cursor) { | 177 void ChromiumBridge::widgetSetCursor(Widget* widget, const Cursor& cursor) { |
177 ChromeClientImpl* chrome_client = ToChromeClient(widget); | 178 ChromeClientImpl* chrome_client = ToChromeClient(widget); |
178 if (chrome_client) | 179 if (chrome_client) |
179 chrome_client->SetCursor(WebCursor(cursor.impl())); | 180 chrome_client->SetCursor(webkit_glue::CursorToWebCursorInfo(cursor)); |
180 } | 181 } |
181 | 182 |
182 void ChromiumBridge::widgetSetFocus(Widget* widget) { | 183 void ChromiumBridge::widgetSetFocus(Widget* widget) { |
183 ChromeClientImpl* chrome_client = ToChromeClient(widget); | 184 ChromeClientImpl* chrome_client = ToChromeClient(widget); |
184 if (chrome_client) | 185 if (chrome_client) |
185 chrome_client->focus(); | 186 chrome_client->focus(); |
186 } | 187 } |
187 | 188 |
188 } // namespace WebCore | 189 } // namespace WebCore |
OLD | NEW |