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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 12252016: Prevented connecting drag drop events to a SwappedOut RenderViewHost in WebContentsViewGtk (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use RenderViewSwappedIn to ensure we have a drag dest Created 7 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/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/browser/renderer_host/dip_util.h" 10 #include "content/browser/renderer_host/dip_util.h"
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); 1273 return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host);
1274 } 1274 }
1275 1275
1276 void WebContentsViewAura::SetPageTitle(const string16& title) { 1276 void WebContentsViewAura::SetPageTitle(const string16& title) {
1277 window_->set_title(title); 1277 window_->set_title(title);
1278 } 1278 }
1279 1279
1280 void WebContentsViewAura::RenderViewCreated(RenderViewHost* host) { 1280 void WebContentsViewAura::RenderViewCreated(RenderViewHost* host) {
1281 } 1281 }
1282 1282
1283 void WebContentsViewAura::RenderViewSwappedIn(RenderViewHost* host) { 1283 void WebContentsViewAura::RenderViewSwappedIn(RenderViewHost* new_host,
1284 RenderViewHost* old_host) {
1284 if (navigation_overlay_.get() && navigation_overlay_->has_window()) { 1285 if (navigation_overlay_.get() && navigation_overlay_->has_window()) {
1285 navigation_overlay_->StartObservingView(static_cast< 1286 navigation_overlay_->StartObservingView(static_cast<
1286 RenderWidgetHostViewAura*>(host->GetView())); 1287 RenderWidgetHostViewAura*>(new_host->GetView()));
1287 } 1288 }
1288 } 1289 }
1289 1290
1290 //////////////////////////////////////////////////////////////////////////////// 1291 ////////////////////////////////////////////////////////////////////////////////
1291 // WebContentsViewAura, RenderViewHostDelegateView implementation: 1292 // WebContentsViewAura, RenderViewHostDelegateView implementation:
1292 1293
1293 void WebContentsViewAura::ShowContextMenu( 1294 void WebContentsViewAura::ShowContextMenu(
1294 const ContextMenuParams& params, 1295 const ContextMenuParams& params,
1295 ContextMenuSourceType type) { 1296 ContextMenuSourceType type) {
1296 if (delegate_.get()) 1297 if (delegate_.get())
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 event.location(), 1632 event.location(),
1632 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), 1633 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
1633 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 1634 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
1634 if (drag_dest_delegate_) 1635 if (drag_dest_delegate_)
1635 drag_dest_delegate_->OnDrop(); 1636 drag_dest_delegate_->OnDrop();
1636 current_drop_data_.reset(); 1637 current_drop_data_.reset();
1637 return current_drag_op_; 1638 return current_drag_op_;
1638 } 1639 }
1639 1640
1640 } // namespace content 1641 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698