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

Side by Side Diff: content/browser/web_contents/web_contents_view_win.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, 10 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_win.h" 5 #include "content/browser/web_contents/web_contents_view_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 void WebContentsViewWin::SetPageTitle(const string16& title) { 231 void WebContentsViewWin::SetPageTitle(const string16& title) {
232 // It's possible to get this after the hwnd has been destroyed. 232 // It's possible to get this after the hwnd has been destroyed.
233 if (GetNativeView()) 233 if (GetNativeView())
234 ::SetWindowText(GetNativeView(), title.c_str()); 234 ::SetWindowText(GetNativeView(), title.c_str());
235 } 235 }
236 236
237 void WebContentsViewWin::RenderViewCreated(RenderViewHost* host) { 237 void WebContentsViewWin::RenderViewCreated(RenderViewHost* host) {
238 } 238 }
239 239
240 void WebContentsViewWin::RenderViewSwappedIn(RenderViewHost* host) { 240 void WebContentsViewWin::RenderViewSwappedIn(RenderViewHost* new_host,
241 RenderViewHost* old_host) {
241 } 242 }
242 243
243 void WebContentsViewWin::ShowContextMenu( 244 void WebContentsViewWin::ShowContextMenu(
244 const ContextMenuParams& params, 245 const ContextMenuParams& params,
245 ContextMenuSourceType type) { 246 ContextMenuSourceType type) {
246 if (delegate_.get()) 247 if (delegate_.get())
247 delegate_->ShowContextMenu(params, type); 248 delegate_->ShowContextMenu(params, type);
248 } 249 }
249 250
250 void WebContentsViewWin::ShowPopupMenu(const gfx::Rect& bounds, 251 void WebContentsViewWin::ShowPopupMenu(const gfx::Rect& bounds,
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 si.nPage = 10; 455 si.nPage = 10;
455 si.nPos = 50; 456 si.nPos = 50;
456 457
457 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); 458 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE);
458 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); 459 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE);
459 460
460 return 1; 461 return 1;
461 } 462 }
462 463
463 } // namespace content 464 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698