OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/renderer_host/render_widget_host_view_views.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 return false; | 408 return false; |
409 } | 409 } |
410 | 410 |
411 void RenderWidgetHostViewViews::AcceleratedCompositingActivated( | 411 void RenderWidgetHostViewViews::AcceleratedCompositingActivated( |
412 bool activated) { | 412 bool activated) { |
413 // TODO(anicolao): figure out if we need something here | 413 // TODO(anicolao): figure out if we need something here |
414 if (activated) | 414 if (activated) |
415 NOTIMPLEMENTED(); | 415 NOTIMPLEMENTED(); |
416 } | 416 } |
417 | 417 |
418 gfx::PluginWindowHandle RenderWidgetHostViewViews::AcquireCompositingSurface() { | 418 gfx::PluginWindowHandle RenderWidgetHostViewViews::GetCompositingSurface() { |
419 GtkNativeViewManager* manager = GtkNativeViewManager::GetInstance(); | 419 GtkNativeViewManager* manager = GtkNativeViewManager::GetInstance(); |
420 gfx::PluginWindowHandle surface = gfx::kNullPluginWindow; | 420 gfx::PluginWindowHandle surface = gfx::kNullPluginWindow; |
421 gfx::NativeViewId view_id = gfx::IdFromNativeView(GetInnerNativeView()); | 421 gfx::NativeViewId view_id = gfx::IdFromNativeView(GetInnerNativeView()); |
422 | 422 |
423 if (!manager->GetXIDForId(&surface, view_id)) { | 423 if (!manager->GetXIDForId(&surface, view_id)) { |
424 DLOG(ERROR) << "Can't find XID for view id " << view_id; | 424 DLOG(ERROR) << "Can't find XID for view id " << view_id; |
425 } | 425 } |
426 return surface; | 426 return surface; |
427 } | 427 } |
428 | 428 |
429 void RenderWidgetHostViewViews::ReleaseCompositingSurface( | |
430 gfx::PluginWindowHandle surface) { | |
431 } | |
432 | |
433 gfx::NativeView RenderWidgetHostViewViews::GetInnerNativeView() const { | 429 gfx::NativeView RenderWidgetHostViewViews::GetInnerNativeView() const { |
434 // TODO(sad): Ideally this function should be equivalent to GetNativeView, and | 430 // TODO(sad): Ideally this function should be equivalent to GetNativeView, and |
435 // WidgetGtk-specific function call should not be necessary. | 431 // WidgetGtk-specific function call should not be necessary. |
436 const views::WidgetGtk* widget = | 432 const views::WidgetGtk* widget = |
437 static_cast<const views::WidgetGtk*>(GetWidget()); | 433 static_cast<const views::WidgetGtk*>(GetWidget()); |
438 return widget ? widget->window_contents() : NULL; | 434 return widget ? widget->window_contents() : NULL; |
439 } | 435 } |
440 | 436 |
441 std::string RenderWidgetHostViewViews::GetClassName() const { | 437 std::string RenderWidgetHostViewViews::GetClassName() const { |
442 return kViewClassName; | 438 return kViewClassName; |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 } | 949 } |
954 | 950 |
955 // static | 951 // static |
956 RenderWidgetHostView* | 952 RenderWidgetHostView* |
957 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 953 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
958 gfx::NativeView widget) { | 954 gfx::NativeView widget) { |
959 gpointer user_data = g_object_get_data(G_OBJECT(widget), | 955 gpointer user_data = g_object_get_data(G_OBJECT(widget), |
960 kRenderWidgetHostViewKey); | 956 kRenderWidgetHostViewKey); |
961 return reinterpret_cast<RenderWidgetHostView*>(user_data); | 957 return reinterpret_cast<RenderWidgetHostView*>(user_data); |
962 } | 958 } |
OLD | NEW |