| 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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1863 | 1863 |
| 1864 void WebContentsImpl::Close() { | 1864 void WebContentsImpl::Close() { |
| 1865 Close(GetRenderViewHost()); | 1865 Close(GetRenderViewHost()); |
| 1866 } | 1866 } |
| 1867 | 1867 |
| 1868 void WebContentsImpl::OnCloseStarted() { | 1868 void WebContentsImpl::OnCloseStarted() { |
| 1869 if (close_start_time_.is_null()) | 1869 if (close_start_time_.is_null()) |
| 1870 close_start_time_ = base::TimeTicks::Now(); | 1870 close_start_time_ = base::TimeTicks::Now(); |
| 1871 } | 1871 } |
| 1872 | 1872 |
| 1873 bool WebContentsImpl::ShouldAcceptDragAndDrop() const { | |
| 1874 #if defined(OS_CHROMEOS) | |
| 1875 // ChromeOS panels (pop-ups) do not take drag-n-drop. | |
| 1876 // See http://crosbug.com/2413 | |
| 1877 if (delegate_ && delegate_->IsPopupOrPanel(this)) | |
| 1878 return false; | |
| 1879 return true; | |
| 1880 #else | |
| 1881 return true; | |
| 1882 #endif | |
| 1883 } | |
| 1884 | |
| 1885 void WebContentsImpl::SystemDragEnded() { | 1873 void WebContentsImpl::SystemDragEnded() { |
| 1886 if (GetRenderViewHost()) | 1874 if (GetRenderViewHost()) |
| 1887 GetRenderViewHostImpl()->DragSourceSystemDragEnded(); | 1875 GetRenderViewHostImpl()->DragSourceSystemDragEnded(); |
| 1888 if (delegate_) | 1876 if (delegate_) |
| 1889 delegate_->DragEnded(); | 1877 delegate_->DragEnded(); |
| 1890 } | 1878 } |
| 1891 | 1879 |
| 1892 void WebContentsImpl::UserGestureDone() { | 1880 void WebContentsImpl::UserGestureDone() { |
| 1893 OnUserGesture(); | 1881 OnUserGesture(); |
| 1894 } | 1882 } |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3510 } | 3498 } |
| 3511 | 3499 |
| 3512 BrowserPluginGuestManager* | 3500 BrowserPluginGuestManager* |
| 3513 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3501 WebContentsImpl::GetBrowserPluginGuestManager() const { |
| 3514 return static_cast<BrowserPluginGuestManager*>( | 3502 return static_cast<BrowserPluginGuestManager*>( |
| 3515 GetBrowserContext()->GetUserData( | 3503 GetBrowserContext()->GetUserData( |
| 3516 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3504 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
| 3517 } | 3505 } |
| 3518 | 3506 |
| 3519 } // namespace content | 3507 } // namespace content |
| OLD | NEW |