Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 6012002: Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi and put... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 #include "grit/locale_settings.h" 106 #include "grit/locale_settings.h"
107 #include "grit/platform_locale_settings.h" 107 #include "grit/platform_locale_settings.h"
108 #include "grit/theme_resources.h" 108 #include "grit/theme_resources.h"
109 #include "net/base/mime_util.h" 109 #include "net/base/mime_util.h"
110 #include "net/base/net_errors.h" 110 #include "net/base/net_errors.h"
111 #include "net/base/net_util.h" 111 #include "net/base/net_util.h"
112 #include "net/base/registry_controlled_domain.h" 112 #include "net/base/registry_controlled_domain.h"
113 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 113 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
114 #include "webkit/glue/webpreferences.h" 114 #include "webkit/glue/webpreferences.h"
115 #include "webkit/glue/password_form.h" 115 #include "webkit/glue/password_form.h"
116 #include "webkit/glue/plugins/plugin_list.h" 116 #include "webkit/plugins/npapi/plugin_list.h"
117 117
118 // Cross-Site Navigations 118 // Cross-Site Navigations
119 // 119 //
120 // If a TabContents is told to navigate to a different web site (as determined 120 // If a TabContents is told to navigate to a different web site (as determined
121 // by SiteInstance), it will replace its current RenderViewHost with a new 121 // by SiteInstance), it will replace its current RenderViewHost with a new
122 // RenderViewHost dedicated to the new SiteInstance. This works as follows: 122 // RenderViewHost dedicated to the new SiteInstance. This works as follows:
123 // 123 //
124 // - Navigate determines whether the destination is cross-site, and if so, 124 // - Navigate determines whether the destination is cross-site, and if so,
125 // it creates a pending_render_view_host_ and moves into the PENDING 125 // it creates a pending_render_view_host_ and moves into the PENDING
126 // RendererState. 126 // RendererState.
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 #if defined(OS_WIN) 2085 #if defined(OS_WIN)
2086 // TODO(PORT): pull in when plug-ins work 2086 // TODO(PORT): pull in when plug-ins work
2087 GetPluginInstaller()->OnMissingPluginStatus(status); 2087 GetPluginInstaller()->OnMissingPluginStatus(status);
2088 #endif 2088 #endif
2089 } 2089 }
2090 2090
2091 void TabContents::OnCrashedPlugin(const FilePath& plugin_path) { 2091 void TabContents::OnCrashedPlugin(const FilePath& plugin_path) {
2092 DCHECK(!plugin_path.value().empty()); 2092 DCHECK(!plugin_path.value().empty());
2093 2093
2094 std::wstring plugin_name = plugin_path.ToWStringHack(); 2094 std::wstring plugin_name = plugin_path.ToWStringHack();
2095 WebPluginInfo plugin_info; 2095 webkit::npapi::WebPluginInfo plugin_info;
2096 if (NPAPI::PluginList::Singleton()->GetPluginInfoByPath( 2096 if (webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath(
2097 plugin_path, &plugin_info) && 2097 plugin_path, &plugin_info) &&
2098 !plugin_info.name.empty()) { 2098 !plugin_info.name.empty()) {
2099 plugin_name = UTF16ToWide(plugin_info.name); 2099 plugin_name = UTF16ToWide(plugin_info.name);
2100 #if defined(OS_MACOSX) 2100 #if defined(OS_MACOSX)
2101 // Many plugins on the Mac have .plugin in the actual name, which looks 2101 // Many plugins on the Mac have .plugin in the actual name, which looks
2102 // terrible, so look for that and strip it off if present. 2102 // terrible, so look for that and strip it off if present.
2103 const std::wstring plugin_extension(L".plugin"); 2103 const std::wstring plugin_extension(L".plugin");
2104 if (EndsWith(plugin_name, plugin_extension, true)) 2104 if (EndsWith(plugin_name, plugin_extension, true))
2105 plugin_name.erase(plugin_name.length() - plugin_extension.length()); 2105 plugin_name.erase(plugin_name.length() - plugin_extension.length());
2106 #endif // OS_MACOSX 2106 #endif // OS_MACOSX
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
3342 } 3342 }
3343 3343
3344 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 3344 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
3345 render_manager_.SwapInRenderViewHost(rvh); 3345 render_manager_.SwapInRenderViewHost(rvh);
3346 } 3346 }
3347 3347
3348 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 3348 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
3349 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 3349 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
3350 rwh_view->SetSize(view()->GetContainerSize()); 3350 rwh_view->SetSize(view()->GetContainerSize());
3351 } 3351 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_win.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698