OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1861 activatable); | 1861 activatable); |
1862 return widget->webwidget(); | 1862 return widget->webwidget(); |
1863 } | 1863 } |
1864 | 1864 |
1865 WebPluginDelegate* RenderView::CreatePluginDelegate( | 1865 WebPluginDelegate* RenderView::CreatePluginDelegate( |
1866 WebView* webview, | 1866 WebView* webview, |
1867 const GURL& url, | 1867 const GURL& url, |
1868 const std::string& mime_type, | 1868 const std::string& mime_type, |
1869 const std::string& clsid, | 1869 const std::string& clsid, |
1870 std::string* actual_mime_type) { | 1870 std::string* actual_mime_type) { |
1871 #if defined(OS_WIN) | 1871 #if defined(OS_WIN) || defined(OS_LINUX) |
1872 if (!PluginChannelHost::IsListening()) | 1872 if (!PluginChannelHost::IsListening()) |
1873 return NULL; | 1873 return NULL; |
1874 | 1874 |
1875 if (RenderProcess::current()->in_process_plugins()) { | 1875 if (RenderProcess::current()->in_process_plugins()) { |
1876 FilePath path; | 1876 FilePath path; |
1877 render_thread_->Send( | 1877 render_thread_->Send( |
1878 new ViewHostMsg_GetPluginPath(url, mime_type, clsid, &path, | 1878 new ViewHostMsg_GetPluginPath(url, mime_type, clsid, &path, |
1879 actual_mime_type)); | 1879 actual_mime_type)); |
1880 if (path.value().empty()) | 1880 if (path.value().empty()) |
1881 return NULL; | 1881 return NULL; |
(...skipping 13 matching lines...) Expand all Loading... |
1895 WebPluginDelegateProxy::Create(url, mime_type, clsid, this); | 1895 WebPluginDelegateProxy::Create(url, mime_type, clsid, this); |
1896 if (!proxy) | 1896 if (!proxy) |
1897 return NULL; | 1897 return NULL; |
1898 | 1898 |
1899 // We hold onto the proxy so we can poke it when we are painting. See our | 1899 // We hold onto the proxy so we can poke it when we are painting. See our |
1900 // DidPaint implementation below. | 1900 // DidPaint implementation below. |
1901 plugin_delegates_.push_back(proxy); | 1901 plugin_delegates_.push_back(proxy); |
1902 | 1902 |
1903 return proxy; | 1903 return proxy; |
1904 #else | 1904 #else |
1905 // TODO(port): Plugins currently not supported | 1905 // TODO(port): Plugins currently not supported |
1906 NOTIMPLEMENTED(); | 1906 NOTIMPLEMENTED(); |
1907 return NULL; | 1907 return NULL; |
1908 #endif | 1908 #endif |
1909 } | 1909 } |
1910 | 1910 |
1911 webkit_glue::WebMediaPlayerDelegate* RenderView::CreateMediaPlayerDelegate() { | 1911 webkit_glue::WebMediaPlayerDelegate* RenderView::CreateMediaPlayerDelegate() { |
1912 #if defined(OS_WIN) | 1912 #if defined(OS_WIN) |
1913 return new WebMediaPlayerDelegateImpl(this); | 1913 return new WebMediaPlayerDelegateImpl(this); |
1914 #else | 1914 #else |
1915 // TODO(port) | 1915 // TODO(port) |
1916 NOTIMPLEMENTED(); | 1916 NOTIMPLEMENTED(); |
1917 return NULL; | 1917 return NULL; |
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 } | 3026 } |
3027 } | 3027 } |
3028 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinishDoc", start_to_finish_doc); | 3028 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinishDoc", start_to_finish_doc); |
3029 UMA_HISTOGRAM_TIMES("Renderer.All.FinishDocToFinish", finish_doc_to_finish); | 3029 UMA_HISTOGRAM_TIMES("Renderer.All.FinishDocToFinish", finish_doc_to_finish); |
3030 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinish", start_to_finish); | 3030 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinish", start_to_finish); |
3031 if (start_to_first_layout.ToInternalValue() >= 0) { | 3031 if (start_to_first_layout.ToInternalValue() >= 0) { |
3032 UMA_HISTOGRAM_TIMES( | 3032 UMA_HISTOGRAM_TIMES( |
3033 "Renderer.All.StartToFirstLayout", start_to_first_layout); | 3033 "Renderer.All.StartToFirstLayout", start_to_first_layout); |
3034 } | 3034 } |
3035 } | 3035 } |
OLD | NEW |