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

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

Issue 8071013: Finish moving plugin probing out of process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review Created 9 years, 2 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 #include "chrome/common/profiling.h" 128 #include "chrome/common/profiling.h"
129 #include "chrome/common/url_constants.h" 129 #include "chrome/common/url_constants.h"
130 #include "chrome/common/web_apps.h" 130 #include "chrome/common/web_apps.h"
131 #include "content/browser/browser_url_handler.h" 131 #include "content/browser/browser_url_handler.h"
132 #include "content/browser/child_process_security_policy.h" 132 #include "content/browser/child_process_security_policy.h"
133 #include "content/browser/debugger/devtools_manager.h" 133 #include "content/browser/debugger/devtools_manager.h"
134 #include "content/browser/download/download_item.h" 134 #include "content/browser/download/download_item.h"
135 #include "content/browser/download/download_manager.h" 135 #include "content/browser/download/download_manager.h"
136 #include "content/browser/download/save_package.h" 136 #include "content/browser/download/save_package.h"
137 #include "content/browser/host_zoom_map.h" 137 #include "content/browser/host_zoom_map.h"
138 #include "content/browser/plugin_service.h"
138 #include "content/browser/renderer_host/render_view_host.h" 139 #include "content/browser/renderer_host/render_view_host.h"
139 #include "content/browser/site_instance.h" 140 #include "content/browser/site_instance.h"
140 #include "content/browser/tab_contents/interstitial_page.h" 141 #include "content/browser/tab_contents/interstitial_page.h"
141 #include "content/browser/tab_contents/navigation_controller.h" 142 #include "content/browser/tab_contents/navigation_controller.h"
142 #include "content/browser/tab_contents/navigation_entry.h" 143 #include "content/browser/tab_contents/navigation_entry.h"
143 #include "content/browser/tab_contents/tab_contents_view.h" 144 #include "content/browser/tab_contents/tab_contents_view.h"
144 #include "content/browser/user_metrics.h" 145 #include "content/browser/user_metrics.h"
145 #include "content/common/content_restriction.h" 146 #include "content/common/content_restriction.h"
146 #include "content/common/content_switches.h" 147 #include "content/common/content_switches.h"
147 #include "content/common/notification_service.h" 148 #include "content/common/notification_service.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 #include "chrome/browser/chromeos/boot_times_loader.h" 181 #include "chrome/browser/chromeos/boot_times_loader.h"
181 #include "chrome/browser/ui/webui/active_downloads_ui.h" 182 #include "chrome/browser/ui/webui/active_downloads_ui.h"
182 #else 183 #else
183 #include "chrome/browser/download/download_shelf.h" 184 #include "chrome/browser/download/download_shelf.h"
184 #endif 185 #endif
185 186
186 #if defined(FILE_MANAGER_EXTENSION) 187 #if defined(FILE_MANAGER_EXTENSION)
187 #include "chrome/browser/extensions/file_manager_util.h" 188 #include "chrome/browser/extensions/file_manager_util.h"
188 #endif 189 #endif
189 190
190 #include "webkit/plugins/npapi/plugin_list.h"
191
192 using base::TimeDelta; 191 using base::TimeDelta;
193 192
194 /////////////////////////////////////////////////////////////////////////////// 193 ///////////////////////////////////////////////////////////////////////////////
195 194
196 namespace { 195 namespace {
197 196
198 // The URL to be loaded to display Help. 197 // The URL to be loaded to display Help.
199 const char kHelpContentUrl[] = 198 const char kHelpContentUrl[] =
200 #if defined(OS_CHROMEOS) 199 #if defined(OS_CHROMEOS)
201 #if defined(OFFICIAL_BUILD) 200 #if defined(OFFICIAL_BUILD)
(...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2533 const FilePath& plugin_path) { 2532 const FilePath& plugin_path) {
2534 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents( 2533 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
2535 tab); 2534 tab);
2536 if (!tcw) 2535 if (!tcw)
2537 return; 2536 return;
2538 2537
2539 DCHECK(!plugin_path.value().empty()); 2538 DCHECK(!plugin_path.value().empty());
2540 2539
2541 string16 plugin_name = plugin_path.LossyDisplayName(); 2540 string16 plugin_name = plugin_path.LossyDisplayName();
2542 webkit::WebPluginInfo plugin_info; 2541 webkit::WebPluginInfo plugin_info;
2543 if (webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath( 2542 if (PluginService::GetInstance()->GetPluginInfoByPath(
2544 plugin_path, &plugin_info) && 2543 plugin_path, &plugin_info) &&
2545 !plugin_info.name.empty()) { 2544 !plugin_info.name.empty()) {
2546 plugin_name = plugin_info.name; 2545 plugin_name = plugin_info.name;
2547 #if defined(OS_MACOSX) 2546 #if defined(OS_MACOSX)
2548 // Many plugins on the Mac have .plugin in the actual name, which looks 2547 // Many plugins on the Mac have .plugin in the actual name, which looks
2549 // terrible, so look for that and strip it off if present. 2548 // terrible, so look for that and strip it off if present.
2550 const std::string kPluginExtension = ".plugin"; 2549 const std::string kPluginExtension = ".plugin";
2551 if (EndsWith(plugin_name, ASCIIToUTF16(kPluginExtension), true)) 2550 if (EndsWith(plugin_name, ASCIIToUTF16(kPluginExtension), true))
2552 plugin_name.erase(plugin_name.length() - kPluginExtension.length()); 2551 plugin_name.erase(plugin_name.length() - kPluginExtension.length());
2553 #endif // OS_MACOSX 2552 #endif // OS_MACOSX
(...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after
5299 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); 5298 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type);
5300 } else if (is_type_tabbed()) { 5299 } else if (is_type_tabbed()) {
5301 GlobalErrorService* service = 5300 GlobalErrorService* service =
5302 GlobalErrorServiceFactory::GetForProfile(profile()); 5301 GlobalErrorServiceFactory::GetForProfile(profile());
5303 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5302 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5304 if (error) { 5303 if (error) {
5305 error->ShowBubbleView(this); 5304 error->ShowBubbleView(this);
5306 } 5305 }
5307 } 5306 }
5308 } 5307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698