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

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
« no previous file with comments | « chrome/browser/oom_priority_manager.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 tab->OpenURL(GURL(kReaderUpdateUrl), GURL(), NEW_FOREGROUND_TAB, 129 tab->OpenURL(GURL(kReaderUpdateUrl), GURL(), NEW_FOREGROUND_TAB,
130 content::PAGE_TRANSITION_LINK); 130 content::PAGE_TRANSITION_LINK);
131 } 131 }
132 132
133 // Opens the PDF using Adobe Reader. 133 // Opens the PDF using Adobe Reader.
134 void OpenUsingReader(TabContentsWrapper* tab, 134 void OpenUsingReader(TabContentsWrapper* tab,
135 const WebPluginInfo& reader_plugin, 135 const WebPluginInfo& reader_plugin,
136 InfoBarDelegate* old_delegate, 136 InfoBarDelegate* old_delegate,
137 InfoBarDelegate* new_delegate) { 137 InfoBarDelegate* new_delegate) {
138 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab( 138 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab(
139 tab->render_view_host()->process()->id(), 139 tab->render_view_host()->process()->GetID(),
140 tab->render_view_host()->routing_id(), 140 tab->render_view_host()->routing_id(),
141 tab->tab_contents()->GetURL(), 141 tab->tab_contents()->GetURL(),
142 ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName)); 142 ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName));
143 tab->render_view_host()->ReloadFrame(); 143 tab->render_view_host()->ReloadFrame();
144 144
145 if (new_delegate) { 145 if (new_delegate) {
146 if (old_delegate) { 146 if (old_delegate) {
147 tab->infobar_tab_helper()->ReplaceInfoBar(old_delegate, new_delegate); 147 tab->infobar_tab_helper()->ReplaceInfoBar(old_delegate, new_delegate);
148 } else { 148 } else {
149 tab->infobar_tab_helper()->AddInfoBar(new_delegate); 149 tab->infobar_tab_helper()->AddInfoBar(new_delegate);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 void PDFHasUnsupportedFeature(TabContentsWrapper* tab) { 396 void PDFHasUnsupportedFeature(TabContentsWrapper* tab) {
397 #if !defined(OS_WIN) 397 #if !defined(OS_WIN)
398 // Only works for Windows for now. For Mac, we'll have to launch the file 398 // Only works for Windows for now. For Mac, we'll have to launch the file
399 // externally since Adobe Reader doesn't work inside Chrome. 399 // externally since Adobe Reader doesn't work inside Chrome.
400 return; 400 return;
401 #endif 401 #endif
402 402
403 PluginService::GetInstance()->GetPluginGroups( 403 PluginService::GetInstance()->GetPluginGroups(
404 base::Bind(&GotPluginGroupsCallback, 404 base::Bind(&GotPluginGroupsCallback,
405 tab->render_view_host()->process()->id(), 405 tab->render_view_host()->process()->GetID(),
406 tab->render_view_host()->routing_id())); 406 tab->render_view_host()->routing_id()));
407 } 407 }
OLDNEW
« no previous file with comments | « chrome/browser/oom_priority_manager.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698