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

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

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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) 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 "chrome/browser/ui/pdf/pdf_unsupported_feature.h" 5 #include "chrome/browser/ui/pdf/pdf_unsupported_feature.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "base/version.h" 10 #include "base/version.h"
11 #include "chrome/browser/chrome_plugin_service_filter.h" 11 #include "chrome/browser/chrome_plugin_service_filter.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 tab->OpenURL(params); 142 tab->OpenURL(params);
143 } 143 }
144 144
145 // Opens the PDF using Adobe Reader. 145 // Opens the PDF using Adobe Reader.
146 void OpenUsingReader(TabContentsWrapper* tab, 146 void OpenUsingReader(TabContentsWrapper* tab,
147 const WebPluginInfo& reader_plugin, 147 const WebPluginInfo& reader_plugin,
148 InfoBarDelegate* old_delegate, 148 InfoBarDelegate* old_delegate,
149 InfoBarDelegate* new_delegate) { 149 InfoBarDelegate* new_delegate) {
150 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab( 150 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab(
151 tab->web_contents()->GetRenderProcessHost()->GetID(), 151 tab->web_contents()->GetRenderProcessHost()->GetID(),
152 tab->web_contents()->GetRenderViewHost()->routing_id(), 152 tab->web_contents()->GetRenderViewHost()->GetRoutingID(),
153 tab->web_contents()->GetURL(), 153 tab->web_contents()->GetURL(),
154 ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName)); 154 ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName));
155 tab->web_contents()->GetRenderViewHost()->ReloadFrame(); 155 tab->web_contents()->GetRenderViewHost()->ReloadFrame();
156 156
157 if (new_delegate) { 157 if (new_delegate) {
158 if (old_delegate) { 158 if (old_delegate) {
159 tab->infobar_tab_helper()->ReplaceInfoBar(old_delegate, new_delegate); 159 tab->infobar_tab_helper()->ReplaceInfoBar(old_delegate, new_delegate);
160 } else { 160 } else {
161 tab->infobar_tab_helper()->AddInfoBar(new_delegate); 161 tab->infobar_tab_helper()->AddInfoBar(new_delegate);
162 } 162 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 void PDFHasUnsupportedFeature(TabContentsWrapper* tab) { 414 void PDFHasUnsupportedFeature(TabContentsWrapper* tab) {
415 #if !defined(OS_WIN) 415 #if !defined(OS_WIN)
416 // Only works for Windows for now. For Mac, we'll have to launch the file 416 // Only works for Windows for now. For Mac, we'll have to launch the file
417 // externally since Adobe Reader doesn't work inside Chrome. 417 // externally since Adobe Reader doesn't work inside Chrome.
418 return; 418 return;
419 #endif 419 #endif
420 420
421 PluginService::GetInstance()->GetPluginGroups( 421 PluginService::GetInstance()->GetPluginGroups(
422 base::Bind(&GotPluginGroupsCallback, 422 base::Bind(&GotPluginGroupsCallback,
423 tab->web_contents()->GetRenderProcessHost()->GetID(), 423 tab->web_contents()->GetRenderProcessHost()->GetID(),
424 tab->web_contents()->GetRenderViewHost()->routing_id())); 424 tab->web_contents()->GetRenderViewHost()->GetRoutingID()));
425 } 425 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/login/login_prompt_win.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698