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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2012 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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 base::string16 PDFEnableAdobeReaderPromptClient::GetCancelButtonText() const { 121 base::string16 PDFEnableAdobeReaderPromptClient::GetCancelButtonText() const {
122 return l10n_util::GetStringUTF16(IDS_DONE); 122 return l10n_util::GetStringUTF16(IDS_DONE);
123 } 123 }
124 124
125 base::string16 PDFEnableAdobeReaderPromptClient::GetMessageText() const { 125 base::string16 PDFEnableAdobeReaderPromptClient::GetMessageText() const {
126 return l10n_util::GetStringUTF16(IDS_PDF_INFOBAR_QUESTION_ALWAYS_USE_READER); 126 return l10n_util::GetStringUTF16(IDS_PDF_INFOBAR_QUESTION_ALWAYS_USE_READER);
127 } 127 }
128 128
129 // Launch the url to get the latest Adbobe Reader installer. 129 // Launch the url to get the latest Adbobe Reader installer.
130 void OpenReaderUpdateURL(WebContents* web_contents) { 130 void OpenReaderUpdateURL(WebContents* web_contents) {
131 OpenURLParams params( 131 OpenURLParams params(GURL(kAdobeReaderUpdateUrl), Referrer(),
132 GURL(kAdobeReaderUpdateUrl), Referrer(), NEW_FOREGROUND_TAB, 132 WindowOpenDisposition::NEW_FOREGROUND_TAB,
133 ui::PAGE_TRANSITION_LINK, false); 133 ui::PAGE_TRANSITION_LINK, false);
134 web_contents->OpenURL(params); 134 web_contents->OpenURL(params);
135 } 135 }
136 136
137 // Opens the PDF using Adobe Reader. 137 // Opens the PDF using Adobe Reader.
138 void OpenUsingReader(WebContents* web_contents, 138 void OpenUsingReader(WebContents* web_contents,
139 const WebPluginInfo& reader_plugin, 139 const WebPluginInfo& reader_plugin,
140 pdf::OpenPDFInReaderPromptClient* client) { 140 pdf::OpenPDFInReaderPromptClient* client) {
141 ChromePluginServiceFilter::GetInstance()->OverridePluginForFrame( 141 ChromePluginServiceFilter::GetInstance()->OverridePluginForFrame(
142 web_contents->GetRenderProcessHost()->GetID(), 142 web_contents->GetRenderProcessHost()->GetID(),
143 web_contents->GetMainFrame()->GetRoutingID(), 143 web_contents->GetMainFrame()->GetRoutingID(),
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 MaybeShowOpenPDFInReaderPrompt(web_contents, reader_info); 357 MaybeShowOpenPDFInReaderPrompt(web_contents, reader_info);
358 return; 358 return;
359 } 359 }
360 GetAdobeReaderPluginInfoAsync( 360 GetAdobeReaderPluginInfoAsync(
361 profile, 361 profile,
362 base::Bind(&GotPluginsCallback, 362 base::Bind(&GotPluginsCallback,
363 web_contents->GetRenderProcessHost()->GetID(), 363 web_contents->GetRenderProcessHost()->GetID(),
364 web_contents->GetRenderViewHost()->GetRoutingID())); 364 web_contents->GetRenderViewHost()->GetRoutingID()));
365 #endif // defined(OS_WIN) 365 #endif // defined(OS_WIN)
366 } 366 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698