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

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

Issue 12045022: Move code in ui\webui\jstemplate_builder.* to webui namespace for consistency. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | chrome/browser/ui/webui/about_ui.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) 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 strings.SetString( 187 strings.SetString(
188 "ok", 188 "ok",
189 l10n_util::GetStringUTF16(IDS_READER_OUT_OF_DATE_BLOCKING_PAGE_OK)); 189 l10n_util::GetStringUTF16(IDS_READER_OUT_OF_DATE_BLOCKING_PAGE_OK));
190 strings.SetString( 190 strings.SetString(
191 "cancel", 191 "cancel",
192 l10n_util::GetStringUTF16(IDS_READER_OUT_OF_DATE_BLOCKING_PAGE_CANCEL)); 192 l10n_util::GetStringUTF16(IDS_READER_OUT_OF_DATE_BLOCKING_PAGE_CANCEL));
193 193
194 base::StringPiece html(ResourceBundle::GetSharedInstance(). 194 base::StringPiece html(ResourceBundle::GetSharedInstance().
195 GetRawDataResource(IDR_READER_OUT_OF_DATE_HTML)); 195 GetRawDataResource(IDR_READER_OUT_OF_DATE_HTML));
196 196
197 return jstemplate_builder::GetI18nTemplateHtml(html, &strings); 197 return webui::GetI18nTemplateHtml(html, &strings);
198 } 198 }
199 199
200 virtual void CommandReceived(const std::string& command) OVERRIDE { 200 virtual void CommandReceived(const std::string& command) OVERRIDE {
201 if (command == "0") { 201 if (command == "0") {
202 content::RecordAction( 202 content::RecordAction(
203 UserMetricsAction("PDF_ReaderInterstitialCancel")); 203 UserMetricsAction("PDF_ReaderInterstitialCancel"));
204 interstitial_page_->DontProceed(); 204 interstitial_page_->DontProceed();
205 return; 205 return;
206 } 206 }
207 207
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 397
398 void PDFHasUnsupportedFeature(content::WebContents* web_contents) { 398 void PDFHasUnsupportedFeature(content::WebContents* web_contents) {
399 #if defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION) 399 #if defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION)
400 // Only works for Windows for now. For Mac, we'll have to launch the file 400 // Only works for Windows for now. For Mac, we'll have to launch the file
401 // externally since Adobe Reader doesn't work inside Chrome. 401 // externally since Adobe Reader doesn't work inside Chrome.
402 PluginService::GetInstance()->GetPlugins(base::Bind(&GotPluginsCallback, 402 PluginService::GetInstance()->GetPlugins(base::Bind(&GotPluginsCallback,
403 web_contents->GetRenderProcessHost()->GetID(), 403 web_contents->GetRenderProcessHost()->GetID(),
404 web_contents->GetRenderViewHost()->GetRoutingID())); 404 web_contents->GetRenderViewHost()->GetRoutingID()));
405 #endif 405 #endif
406 } 406 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | chrome/browser/ui/webui/about_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698