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

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

Issue 1813143002: 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: rebase 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 }
1087 #endif 1078 #endif
1088 1079
1089 bool RenderWidgetHostViewAura::HasAcceleratedSurface( 1080 bool RenderWidgetHostViewAura::HasAcceleratedSurface(
1090 const gfx::Size& desired_size) { 1081 const gfx::Size& desired_size) {
1091 // Aura doesn't use GetBackingStore for accelerated pages, so it doesn't 1082 // Aura doesn't use GetBackingStore for accelerated pages, so it doesn't
1092 // matter what is returned here as GetBackingStore is the only caller of this 1083 // matter what is returned here as GetBackingStore is the only caller of this
1093 // method. TODO(jbates) implement this if other Aura code needs it. 1084 // method. TODO(jbates) implement this if other Aura code needs it.
1094 return false; 1085 return false;
1095 } 1086 }
1096 1087
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2579 void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) { 2570 void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) {
2580 SnapToPhysicalPixelBoundary(); 2571 SnapToPhysicalPixelBoundary();
2581 // Don't recursively call SetBounds if this bounds update is the result of 2572 // Don't recursively call SetBounds if this bounds update is the result of
2582 // a Window::SetBoundsInternal call. 2573 // a Window::SetBoundsInternal call.
2583 if (!in_bounds_changed_) 2574 if (!in_bounds_changed_)
2584 window_->SetBounds(rect); 2575 window_->SetBounds(rect);
2585 host_->WasResized(); 2576 host_->WasResized();
2586 delegated_frame_host_->WasResized(); 2577 delegated_frame_host_->WasResized();
2587 #if defined(OS_WIN) 2578 #if defined(OS_WIN)
2588 // Create the legacy dummy window which corresponds to the bounds of the 2579 // Create the legacy dummy window which corresponds to the bounds of the
2589 // webcontents. This will be passed as the container window for windowless 2580 // webcontents. It is needed for accessibility and for scrolling to work in
2590 // plugins. 2581 // legacy drivers for trackpoints/trackpads, etc.
2591 // Additonally the legacy dummy window is needed for accessibility and for
2592 // scrolling to work in legacy drivers for trackpoints/trackpads, etc.
2593 if (!legacy_window_destroyed_ && GetNativeViewId()) { 2582 if (!legacy_window_destroyed_ && GetNativeViewId()) {
2594 if (!legacy_render_widget_host_HWND_) { 2583 if (!legacy_render_widget_host_HWND_) {
2595 legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create( 2584 legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create(
2596 reinterpret_cast<HWND>(GetNativeViewId())); 2585 reinterpret_cast<HWND>(GetNativeViewId()));
2597 } 2586 }
2598 if (legacy_render_widget_host_HWND_) { 2587 if (legacy_render_widget_host_HWND_) {
2599 legacy_render_widget_host_HWND_->set_host(this); 2588 legacy_render_widget_host_HWND_->set_host(this);
2600 legacy_render_widget_host_HWND_->SetBounds( 2589 legacy_render_widget_host_HWND_->SetBounds(
2601 window_->GetBoundsInRootWindow()); 2590 window_->GetBoundsInRootWindow());
2602 // There are cases where the parent window is created, made visible and 2591 // There are cases where the parent window is created, made visible and
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2941 2930
2942 //////////////////////////////////////////////////////////////////////////////// 2931 ////////////////////////////////////////////////////////////////////////////////
2943 // RenderWidgetHostViewBase, public: 2932 // RenderWidgetHostViewBase, public:
2944 2933
2945 // static 2934 // static
2946 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2935 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2947 GetScreenInfoForWindow(results, NULL); 2936 GetScreenInfoForWindow(results, NULL);
2948 } 2937 }
2949 2938
2950 } // namespace content 2939 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698