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

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

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/pdf_unsupported_feature.h" 5 #include "chrome/browser/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"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 tab->OpenURL(GURL(kReaderUpdateUrl), GURL(), NEW_FOREGROUND_TAB, 130 tab->OpenURL(GURL(kReaderUpdateUrl), GURL(), NEW_FOREGROUND_TAB,
131 content::PAGE_TRANSITION_LINK); 131 content::PAGE_TRANSITION_LINK);
132 } 132 }
133 133
134 // Opens the PDF using Adobe Reader. 134 // Opens the PDF using Adobe Reader.
135 void OpenUsingReader(TabContentsWrapper* tab, 135 void OpenUsingReader(TabContentsWrapper* tab,
136 const WebPluginInfo& reader_plugin, 136 const WebPluginInfo& reader_plugin,
137 InfoBarDelegate* old_delegate, 137 InfoBarDelegate* old_delegate,
138 InfoBarDelegate* new_delegate) { 138 InfoBarDelegate* new_delegate) {
139 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab( 139 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab(
140 tab->render_view_host()->process()->id(), 140 tab->render_view_host()->process()->GetID(),
141 tab->render_view_host()->routing_id(), 141 tab->render_view_host()->routing_id(),
142 tab->tab_contents()->GetURL(), 142 tab->tab_contents()->GetURL(),
143 ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName)); 143 ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName));
144 tab->render_view_host()->ReloadFrame(); 144 tab->render_view_host()->ReloadFrame();
145 145
146 if (new_delegate) { 146 if (new_delegate) {
147 if (old_delegate) { 147 if (old_delegate) {
148 tab->infobar_tab_helper()->ReplaceInfoBar(old_delegate, new_delegate); 148 tab->infobar_tab_helper()->ReplaceInfoBar(old_delegate, new_delegate);
149 } else { 149 } else {
150 tab->infobar_tab_helper()->AddInfoBar(new_delegate); 150 tab->infobar_tab_helper()->AddInfoBar(new_delegate);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 396
397 void PDFHasUnsupportedFeature(TabContentsWrapper* tab) { 397 void PDFHasUnsupportedFeature(TabContentsWrapper* tab) {
398 #if !defined(OS_WIN) 398 #if !defined(OS_WIN)
399 // Only works for Windows for now. For Mac, we'll have to launch the file 399 // Only works for Windows for now. For Mac, we'll have to launch the file
400 // externally since Adobe Reader doesn't work inside Chrome. 400 // externally since Adobe Reader doesn't work inside Chrome.
401 return; 401 return;
402 #endif 402 #endif
403 403
404 PluginService::GetInstance()->GetPluginGroups( 404 PluginService::GetInstance()->GetPluginGroups(
405 base::Bind(&GotPluginGroupsCallback, 405 base::Bind(&GotPluginGroupsCallback,
406 tab->render_view_host()->process()->id(), 406 tab->render_view_host()->process()->GetID(),
407 tab->render_view_host()->routing_id())); 407 tab->render_view_host()->routing_id()));
408 } 408 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698