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_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 | 1832 |
1833 void WebContentsImpl::Close() { | 1833 void WebContentsImpl::Close() { |
1834 Close(GetRenderViewHost()); | 1834 Close(GetRenderViewHost()); |
1835 } | 1835 } |
1836 | 1836 |
1837 void WebContentsImpl::OnCloseStarted() { | 1837 void WebContentsImpl::OnCloseStarted() { |
1838 if (close_start_time_.is_null()) | 1838 if (close_start_time_.is_null()) |
1839 close_start_time_ = base::TimeTicks::Now(); | 1839 close_start_time_ = base::TimeTicks::Now(); |
1840 } | 1840 } |
1841 | 1841 |
| 1842 void WebContentsImpl::DragSourceEndedAt(int client_x, int client_y, |
| 1843 int screen_x, int screen_y, WebKit::WebDragOperation operation) { |
| 1844 if (browser_plugin_embedder_.get()) |
| 1845 browser_plugin_embedder_->DragSourceEndedAt(client_x, client_y, |
| 1846 screen_x, screen_y, operation); |
| 1847 if (GetRenderViewHost()) |
| 1848 GetRenderViewHostImpl()->DragSourceEndedAt(client_x, client_y, |
| 1849 screen_x, screen_y, operation); |
| 1850 } |
| 1851 |
| 1852 void WebContentsImpl::DragSourceMovedTo(int client_x, int client_y, |
| 1853 int screen_x, int screen_y) { |
| 1854 if (browser_plugin_embedder_.get()) |
| 1855 browser_plugin_embedder_->DragSourceMovedTo(client_x, client_y, |
| 1856 screen_x, screen_y); |
| 1857 if (GetRenderViewHost()) |
| 1858 GetRenderViewHostImpl()->DragSourceMovedTo(client_x, client_y, |
| 1859 screen_x, screen_y); |
| 1860 } |
| 1861 |
1842 void WebContentsImpl::SystemDragEnded() { | 1862 void WebContentsImpl::SystemDragEnded() { |
1843 if (GetRenderViewHost()) | 1863 if (GetRenderViewHost()) |
1844 GetRenderViewHostImpl()->DragSourceSystemDragEnded(); | 1864 GetRenderViewHostImpl()->DragSourceSystemDragEnded(); |
1845 if (delegate_) | 1865 if (delegate_) |
1846 delegate_->DragEnded(); | 1866 delegate_->DragEnded(); |
| 1867 if (browser_plugin_embedder_.get()) |
| 1868 browser_plugin_embedder_->SystemDragEnded(); |
1847 } | 1869 } |
1848 | 1870 |
1849 void WebContentsImpl::UserGestureDone() { | 1871 void WebContentsImpl::UserGestureDone() { |
1850 OnUserGesture(); | 1872 OnUserGesture(); |
1851 } | 1873 } |
1852 | 1874 |
1853 void WebContentsImpl::SetClosedByUserGesture(bool value) { | 1875 void WebContentsImpl::SetClosedByUserGesture(bool value) { |
1854 closed_by_user_gesture_ = value; | 1876 closed_by_user_gesture_ = value; |
1855 } | 1877 } |
1856 | 1878 |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3467 } | 3489 } |
3468 | 3490 |
3469 BrowserPluginGuestManager* | 3491 BrowserPluginGuestManager* |
3470 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3492 WebContentsImpl::GetBrowserPluginGuestManager() const { |
3471 return static_cast<BrowserPluginGuestManager*>( | 3493 return static_cast<BrowserPluginGuestManager*>( |
3472 GetBrowserContext()->GetUserData( | 3494 GetBrowserContext()->GetUserData( |
3473 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3495 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
3474 } | 3496 } |
3475 | 3497 |
3476 } // namespace content | 3498 } // namespace content |
OLD | NEW |