OLD | NEW |
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/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "content/browser/renderer_host/render_view_host_factory.h" | 8 #include "content/browser/renderer_host/render_view_host_factory.h" |
9 #include "content/browser/web_contents/interstitial_page_impl.h" | 9 #include "content/browser/web_contents/interstitial_page_impl.h" |
10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 // We can't close the tab while we're in the drag and | 331 // We can't close the tab while we're in the drag and |
332 // |drag_handler_->CancelDrag()| is async. Instead, set a flag to cancel | 332 // |drag_handler_->CancelDrag()| is async. Instead, set a flag to cancel |
333 // the drag and when the drag nested message loop ends, close the tab. | 333 // the drag and when the drag nested message loop ends, close the tab. |
334 aura::RootWindow* root_window = GetNativeView()->GetRootWindow(); | 334 aura::RootWindow* root_window = GetNativeView()->GetRootWindow(); |
335 if (aura::client::GetDragDropClient(root_window)) | 335 if (aura::client::GetDragDropClient(root_window)) |
336 aura::client::GetDragDropClient(root_window)->DragCancel(); | 336 aura::client::GetDragDropClient(root_window)->DragCancel(); |
337 | 337 |
338 close_tab_after_drag_ends_ = true; | 338 close_tab_after_drag_ends_ = true; |
339 } | 339 } |
340 | 340 |
| 341 WebDropData* WebContentsViewAura::GetDropData() const { |
| 342 return NULL; |
| 343 } |
| 344 |
341 bool WebContentsViewAura::IsEventTracking() const { | 345 bool WebContentsViewAura::IsEventTracking() const { |
342 return false; | 346 return false; |
343 } | 347 } |
344 | 348 |
345 void WebContentsViewAura::CloseTabAfterEventTracking() { | 349 void WebContentsViewAura::CloseTabAfterEventTracking() { |
346 } | 350 } |
347 | 351 |
348 void WebContentsViewAura::GetViewBounds(gfx::Rect* out) const { | 352 void WebContentsViewAura::GetViewBounds(gfx::Rect* out) const { |
349 *out = window_->GetBoundsInRootWindow(); | 353 *out = window_->GetBoundsInRootWindow(); |
350 } | 354 } |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 } | 600 } |
597 | 601 |
598 int WebContentsViewAura::OnPerformDrop(const aura::DropTargetEvent& event) { | 602 int WebContentsViewAura::OnPerformDrop(const aura::DropTargetEvent& event) { |
599 web_contents_->GetRenderViewHost()->DragTargetDrop( | 603 web_contents_->GetRenderViewHost()->DragTargetDrop( |
600 event.location(), | 604 event.location(), |
601 GetNativeView()->GetRootWindow()->last_mouse_location()); | 605 GetNativeView()->GetRootWindow()->last_mouse_location()); |
602 if (drag_dest_delegate_) | 606 if (drag_dest_delegate_) |
603 drag_dest_delegate_->OnDrop(); | 607 drag_dest_delegate_->OnDrop(); |
604 return current_drag_op_; | 608 return current_drag_op_; |
605 } | 609 } |
OLD | NEW |