| 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 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 | 1847 |
| 1848 void WebContentsImpl::Close() { | 1848 void WebContentsImpl::Close() { |
| 1849 Close(GetRenderViewHost()); | 1849 Close(GetRenderViewHost()); |
| 1850 } | 1850 } |
| 1851 | 1851 |
| 1852 void WebContentsImpl::OnCloseStarted() { | 1852 void WebContentsImpl::OnCloseStarted() { |
| 1853 if (close_start_time_.is_null()) | 1853 if (close_start_time_.is_null()) |
| 1854 close_start_time_ = base::TimeTicks::Now(); | 1854 close_start_time_ = base::TimeTicks::Now(); |
| 1855 } | 1855 } |
| 1856 | 1856 |
| 1857 void WebContentsImpl::DragSourceEndedAt(int client_x, int client_y, |
| 1858 int screen_x, int screen_y, WebKit::WebDragOperation operation) { |
| 1859 if (browser_plugin_embedder_.get()) |
| 1860 browser_plugin_embedder_->DragSourceEndedAt(client_x, client_y, |
| 1861 screen_x, screen_y, operation); |
| 1862 if (GetRenderViewHost()) |
| 1863 GetRenderViewHostImpl()->DragSourceEndedAt(client_x, client_y, |
| 1864 screen_x, screen_y, operation); |
| 1865 } |
| 1866 |
| 1867 void WebContentsImpl::DragSourceMovedTo(int client_x, int client_y, |
| 1868 int screen_x, int screen_y) { |
| 1869 if (browser_plugin_embedder_.get()) |
| 1870 browser_plugin_embedder_->DragSourceMovedTo(client_x, client_y, |
| 1871 screen_x, screen_y); |
| 1872 if (GetRenderViewHost()) |
| 1873 GetRenderViewHostImpl()->DragSourceMovedTo(client_x, client_y, |
| 1874 screen_x, screen_y); |
| 1875 } |
| 1876 |
| 1857 void WebContentsImpl::SystemDragEnded() { | 1877 void WebContentsImpl::SystemDragEnded() { |
| 1858 if (GetRenderViewHost()) | 1878 if (GetRenderViewHost()) |
| 1859 GetRenderViewHostImpl()->DragSourceSystemDragEnded(); | 1879 GetRenderViewHostImpl()->DragSourceSystemDragEnded(); |
| 1860 if (delegate_) | 1880 if (delegate_) |
| 1861 delegate_->DragEnded(); | 1881 delegate_->DragEnded(); |
| 1882 if (browser_plugin_embedder_.get()) |
| 1883 browser_plugin_embedder_->SystemDragEnded(); |
| 1862 } | 1884 } |
| 1863 | 1885 |
| 1864 void WebContentsImpl::UserGestureDone() { | 1886 void WebContentsImpl::UserGestureDone() { |
| 1865 OnUserGesture(); | 1887 OnUserGesture(); |
| 1866 } | 1888 } |
| 1867 | 1889 |
| 1868 void WebContentsImpl::SetClosedByUserGesture(bool value) { | 1890 void WebContentsImpl::SetClosedByUserGesture(bool value) { |
| 1869 closed_by_user_gesture_ = value; | 1891 closed_by_user_gesture_ = value; |
| 1870 } | 1892 } |
| 1871 | 1893 |
| (...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3435 } | 3457 } |
| 3436 | 3458 |
| 3437 BrowserPluginGuestManager* | 3459 BrowserPluginGuestManager* |
| 3438 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3460 WebContentsImpl::GetBrowserPluginGuestManager() const { |
| 3439 return static_cast<BrowserPluginGuestManager*>( | 3461 return static_cast<BrowserPluginGuestManager*>( |
| 3440 GetBrowserContext()->GetUserData( | 3462 GetBrowserContext()->GetUserData( |
| 3441 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3463 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
| 3442 } | 3464 } |
| 3443 | 3465 |
| 3444 } // namespace content | 3466 } // namespace content |
| OLD | NEW |