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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1825253002: Revert of Remove a bunch of NPAPI quirks and related support code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_windowed_plugins
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 } 1068 }
1069 1069
1070 void RenderWidgetHostViewAura::DidStopFlinging() { 1070 void RenderWidgetHostViewAura::DidStopFlinging() {
1071 selection_controller_client_->OnScrollCompleted(); 1071 selection_controller_client_->OnScrollCompleted();
1072 } 1072 }
1073 1073
1074 #if defined(OS_WIN) 1074 #if defined(OS_WIN)
1075 void RenderWidgetHostViewAura::SetParentNativeViewAccessible( 1075 void RenderWidgetHostViewAura::SetParentNativeViewAccessible(
1076 gfx::NativeViewAccessible accessible_parent) { 1076 gfx::NativeViewAccessible accessible_parent) {
1077 } 1077 }
1078
1079 gfx::NativeViewId RenderWidgetHostViewAura::GetParentForWindowlessPlugin()
1080 const {
1081 if (legacy_render_widget_host_HWND_) {
1082 return reinterpret_cast<gfx::NativeViewId>(
1083 legacy_render_widget_host_HWND_->hwnd());
1084 }
1085 return NULL;
1086 }
1078 #endif 1087 #endif
1079 1088
1080 bool RenderWidgetHostViewAura::HasAcceleratedSurface( 1089 bool RenderWidgetHostViewAura::HasAcceleratedSurface(
1081 const gfx::Size& desired_size) { 1090 const gfx::Size& desired_size) {
1082 // Aura doesn't use GetBackingStore for accelerated pages, so it doesn't 1091 // Aura doesn't use GetBackingStore for accelerated pages, so it doesn't
1083 // matter what is returned here as GetBackingStore is the only caller of this 1092 // matter what is returned here as GetBackingStore is the only caller of this
1084 // method. TODO(jbates) implement this if other Aura code needs it. 1093 // method. TODO(jbates) implement this if other Aura code needs it.
1085 return false; 1094 return false;
1086 } 1095 }
1087 1096
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) { 2579 void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) {
2571 SnapToPhysicalPixelBoundary(); 2580 SnapToPhysicalPixelBoundary();
2572 // Don't recursively call SetBounds if this bounds update is the result of 2581 // Don't recursively call SetBounds if this bounds update is the result of
2573 // a Window::SetBoundsInternal call. 2582 // a Window::SetBoundsInternal call.
2574 if (!in_bounds_changed_) 2583 if (!in_bounds_changed_)
2575 window_->SetBounds(rect); 2584 window_->SetBounds(rect);
2576 host_->WasResized(); 2585 host_->WasResized();
2577 delegated_frame_host_->WasResized(); 2586 delegated_frame_host_->WasResized();
2578 #if defined(OS_WIN) 2587 #if defined(OS_WIN)
2579 // Create the legacy dummy window which corresponds to the bounds of the 2588 // Create the legacy dummy window which corresponds to the bounds of the
2580 // webcontents. It is needed for accessibility and for scrolling to work in 2589 // webcontents. This will be passed as the container window for windowless
2581 // legacy drivers for trackpoints/trackpads, etc. 2590 // plugins.
2591 // Additonally the legacy dummy window is needed for accessibility and for
2592 // scrolling to work in legacy drivers for trackpoints/trackpads, etc.
2582 if (!legacy_window_destroyed_ && GetNativeViewId()) { 2593 if (!legacy_window_destroyed_ && GetNativeViewId()) {
2583 if (!legacy_render_widget_host_HWND_) { 2594 if (!legacy_render_widget_host_HWND_) {
2584 legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create( 2595 legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create(
2585 reinterpret_cast<HWND>(GetNativeViewId())); 2596 reinterpret_cast<HWND>(GetNativeViewId()));
2586 } 2597 }
2587 if (legacy_render_widget_host_HWND_) { 2598 if (legacy_render_widget_host_HWND_) {
2588 legacy_render_widget_host_HWND_->set_host(this); 2599 legacy_render_widget_host_HWND_->set_host(this);
2589 legacy_render_widget_host_HWND_->SetBounds( 2600 legacy_render_widget_host_HWND_->SetBounds(
2590 window_->GetBoundsInRootWindow()); 2601 window_->GetBoundsInRootWindow());
2591 // There are cases where the parent window is created, made visible and 2602 // There are cases where the parent window is created, made visible and
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2930 2941
2931 //////////////////////////////////////////////////////////////////////////////// 2942 ////////////////////////////////////////////////////////////////////////////////
2932 // RenderWidgetHostViewBase, public: 2943 // RenderWidgetHostViewBase, public:
2933 2944
2934 // static 2945 // static
2935 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2946 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2936 GetScreenInfoForWindow(results, NULL); 2947 GetScreenInfoForWindow(results, NULL);
2937 } 2948 }
2938 2949
2939 } // namespace content 2950 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698