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

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

Issue 10977073: Delete some unused code found by -Wunused-function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leiz Created 8 years, 2 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) 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 OpenUsingReader(tab_contents_, reader_webplugininfo_, NULL); 358 OpenUsingReader(tab_contents_, reader_webplugininfo_, NULL);
359 } 359 }
360 360
361 void PDFUnsupportedFeaturePromptDelegate::Cancel() { 361 void PDFUnsupportedFeaturePromptDelegate::Cancel() {
362 content::RecordAction(reader_installed_ ? 362 content::RecordAction(reader_installed_ ?
363 UserMetricsAction("PDF_UseReaderInfoBarCancel") : 363 UserMetricsAction("PDF_UseReaderInfoBarCancel") :
364 UserMetricsAction("PDF_InstallReaderInfoBarCancel")); 364 UserMetricsAction("PDF_InstallReaderInfoBarCancel"));
365 } 365 }
366 366
367 #if defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION)
367 void GotPluginsCallback(int process_id, 368 void GotPluginsCallback(int process_id,
368 int routing_id, 369 int routing_id,
369 const std::vector<webkit::WebPluginInfo>& plugins) { 370 const std::vector<webkit::WebPluginInfo>& plugins) {
370 WebContents* web_contents = 371 WebContents* web_contents =
371 tab_util::GetWebContentsByID(process_id, routing_id); 372 tab_util::GetWebContentsByID(process_id, routing_id);
372 if (!web_contents) 373 if (!web_contents)
373 return; 374 return;
374 375
375 TabContents* tab = TabContents::FromWebContents(web_contents); 376 TabContents* tab = TabContents::FromWebContents(web_contents);
376 if (!tab) 377 if (!tab)
(...skipping 16 matching lines...) Expand all
393 return; 394 return;
394 } 395 }
395 break; 396 break;
396 } 397 }
397 398
398 scoped_ptr<OpenPDFInReaderPromptDelegate> prompt( 399 scoped_ptr<OpenPDFInReaderPromptDelegate> prompt(
399 new PDFUnsupportedFeaturePromptDelegate(tab, reader, plugin_finder)); 400 new PDFUnsupportedFeaturePromptDelegate(tab, reader, plugin_finder));
400 PDFTabHelper* pdf_tab_helper = PDFTabHelper::FromWebContents(web_contents); 401 PDFTabHelper* pdf_tab_helper = PDFTabHelper::FromWebContents(web_contents);
401 pdf_tab_helper->ShowOpenInReaderPrompt(prompt.Pass()); 402 pdf_tab_helper->ShowOpenInReaderPrompt(prompt.Pass());
402 } 403 }
404 #endif // defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION)
403 405
404 } // namespace 406 } // namespace
405 407
406 void PDFHasUnsupportedFeature(content::WebContents* web_contents) { 408 void PDFHasUnsupportedFeature(content::WebContents* web_contents) {
407 #if defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION) 409 #if defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION)
408 // Only works for Windows for now. For Mac, we'll have to launch the file 410 // Only works for Windows for now. For Mac, we'll have to launch the file
409 // externally since Adobe Reader doesn't work inside Chrome. 411 // externally since Adobe Reader doesn't work inside Chrome.
410 PluginService::GetInstance()->GetPlugins(base::Bind(&GotPluginsCallback, 412 PluginService::GetInstance()->GetPlugins(base::Bind(&GotPluginsCallback,
411 web_contents->GetRenderProcessHost()->GetID(), 413 web_contents->GetRenderProcessHost()->GetID(),
412 web_contents->GetRenderViewHost()->GetRoutingID())); 414 web_contents->GetRenderViewHost()->GetRoutingID()));
413 #endif 415 #endif
414 } 416 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/base_panel_browser_test.cc ('k') | chrome/browser/ui/tab_contents/tab_contents_iterator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698