| 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 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 | 1815 |
| 1816 void WebContentsImpl::Close() { | 1816 void WebContentsImpl::Close() { |
| 1817 Close(GetRenderViewHost()); | 1817 Close(GetRenderViewHost()); |
| 1818 } | 1818 } |
| 1819 | 1819 |
| 1820 void WebContentsImpl::OnCloseStarted() { | 1820 void WebContentsImpl::OnCloseStarted() { |
| 1821 if (close_start_time_.is_null()) | 1821 if (close_start_time_.is_null()) |
| 1822 close_start_time_ = base::TimeTicks::Now(); | 1822 close_start_time_ = base::TimeTicks::Now(); |
| 1823 } | 1823 } |
| 1824 | 1824 |
| 1825 void WebContentsImpl::DragSourceEndedAt(int client_x, int client_y, |
| 1826 int screen_x, int screen_y, WebKit::WebDragOperation operation) { |
| 1827 if (browser_plugin_embedder_.get()) |
| 1828 browser_plugin_embedder_->DragSourceEndedAt(client_x, client_y, |
| 1829 screen_x, screen_y, operation); |
| 1830 if (GetRenderViewHost()) |
| 1831 GetRenderViewHostImpl()->DragSourceEndedAt(client_x, client_y, |
| 1832 screen_x, screen_y, operation); |
| 1833 } |
| 1834 |
| 1835 void WebContentsImpl::DragSourceMovedTo(int client_x, int client_y, |
| 1836 int screen_x, int screen_y) { |
| 1837 if (browser_plugin_embedder_.get()) |
| 1838 browser_plugin_embedder_->DragSourceMovedTo(client_x, client_y, |
| 1839 screen_x, screen_y); |
| 1840 if (GetRenderViewHost()) |
| 1841 GetRenderViewHostImpl()->DragSourceMovedTo(client_x, client_y, |
| 1842 screen_x, screen_y); |
| 1843 } |
| 1844 |
| 1825 void WebContentsImpl::SystemDragEnded() { | 1845 void WebContentsImpl::SystemDragEnded() { |
| 1826 if (GetRenderViewHost()) | 1846 if (GetRenderViewHost()) |
| 1827 GetRenderViewHostImpl()->DragSourceSystemDragEnded(); | 1847 GetRenderViewHostImpl()->DragSourceSystemDragEnded(); |
| 1828 if (delegate_) | 1848 if (delegate_) |
| 1829 delegate_->DragEnded(); | 1849 delegate_->DragEnded(); |
| 1850 if (browser_plugin_embedder_.get()) |
| 1851 browser_plugin_embedder_->SystemDragEnded(); |
| 1830 } | 1852 } |
| 1831 | 1853 |
| 1832 void WebContentsImpl::UserGestureDone() { | 1854 void WebContentsImpl::UserGestureDone() { |
| 1833 OnUserGesture(); | 1855 OnUserGesture(); |
| 1834 } | 1856 } |
| 1835 | 1857 |
| 1836 void WebContentsImpl::SetClosedByUserGesture(bool value) { | 1858 void WebContentsImpl::SetClosedByUserGesture(bool value) { |
| 1837 closed_by_user_gesture_ = value; | 1859 closed_by_user_gesture_ = value; |
| 1838 } | 1860 } |
| 1839 | 1861 |
| (...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3409 } | 3431 } |
| 3410 | 3432 |
| 3411 BrowserPluginGuestManager* | 3433 BrowserPluginGuestManager* |
| 3412 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3434 WebContentsImpl::GetBrowserPluginGuestManager() const { |
| 3413 return static_cast<BrowserPluginGuestManager*>( | 3435 return static_cast<BrowserPluginGuestManager*>( |
| 3414 GetBrowserContext()->GetUserData( | 3436 GetBrowserContext()->GetUserData( |
| 3415 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3437 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
| 3416 } | 3438 } |
| 3417 | 3439 |
| 3418 } // namespace content | 3440 } // namespace content |
| OLD | NEW |