Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: webkit/glue/chromium_bridge_impl.cc

Issue 18768: POSIX: gfx::NativeViewId and CrossProcessEvent (Closed)
Patch Set: Addressing Brett's comments Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/chromium_bridge_impl.cc
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc
index 680ae9e6b40b5532391d205c3e24dea218838911..4780fa6ca72d9ea107fe17edd1520c0dad110bf8 100644
--- a/webkit/glue/chromium_bridge_impl.cc
+++ b/webkit/glue/chromium_bridge_impl.cc
@@ -62,14 +62,10 @@
namespace {
-gfx::NativeView ToPlatform(WebCore::Widget* widget) {
+gfx::NativeViewId ToNativeId(WebCore::Widget* widget) {
if (!widget)
return 0;
- PlatformWidget widget_id = widget->root()->hostWindow()->platformWindow();
- // TODO(eseidel): This cast is a hack. We should replace gfx::NativeView with
- // something more abstract like PlatformWidget since webkit/glue should not
- // know about actual native widgets.
- return static_cast<gfx::NativeView>(widget_id);
+ return widget->root()->hostWindow()->platformWindow();
}
#if PLATFORM(WIN_OS)
@@ -433,25 +429,25 @@ PassRefPtr<Image> ChromiumBridge::loadPlatformImageResource(const char* name) {
// Screen ---------------------------------------------------------------------
int ChromiumBridge::screenDepth(Widget* widget) {
- return webkit_glue::GetScreenInfo(ToPlatform(widget)).depth;
+ return webkit_glue::GetScreenInfo(ToNativeId(widget)).depth;
}
int ChromiumBridge::screenDepthPerComponent(Widget* widget) {
- return webkit_glue::GetScreenInfo(ToPlatform(widget)).depth_per_component;
+ return webkit_glue::GetScreenInfo(ToNativeId(widget)).depth_per_component;
}
bool ChromiumBridge::screenIsMonochrome(Widget* widget) {
- return webkit_glue::GetScreenInfo(ToPlatform(widget)).is_monochrome;
+ return webkit_glue::GetScreenInfo(ToNativeId(widget)).is_monochrome;
}
IntRect ChromiumBridge::screenRect(Widget* widget) {
return webkit_glue::ToIntRect(
- webkit_glue::GetScreenInfo(ToPlatform(widget)).rect);
+ webkit_glue::GetScreenInfo(ToNativeId(widget)).rect);
}
IntRect ChromiumBridge::screenAvailableRect(Widget* widget) {
return webkit_glue::ToIntRect(
- webkit_glue::GetScreenInfo(ToPlatform(widget)).available_rect);
+ webkit_glue::GetScreenInfo(ToNativeId(widget)).available_rect);
}
// SharedTimers ----------------------------------------------------------------
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698