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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Issue 477133004: Printe Preview: add 'More/less options' button and make non-essential sections collapsible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Print Preview UI tests adjusted. Created 6 years, 4 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/webui/print_preview/print_preview_ui.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY_FEDEX); 356 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY_FEDEX);
357 source->AddResourcePath("images/google_doc.png", 357 source->AddResourcePath("images/google_doc.png",
358 IDR_PRINT_PREVIEW_IMAGES_GOOGLE_DOC); 358 IDR_PRINT_PREVIEW_IMAGES_GOOGLE_DOC);
359 source->AddResourcePath("images/pdf.png", IDR_PRINT_PREVIEW_IMAGES_PDF); 359 source->AddResourcePath("images/pdf.png", IDR_PRINT_PREVIEW_IMAGES_PDF);
360 source->AddResourcePath("images/mobile.png", IDR_PRINT_PREVIEW_IMAGES_MOBILE); 360 source->AddResourcePath("images/mobile.png", IDR_PRINT_PREVIEW_IMAGES_MOBILE);
361 source->AddResourcePath("images/mobile_shared.png", 361 source->AddResourcePath("images/mobile_shared.png",
362 IDR_PRINT_PREVIEW_IMAGES_MOBILE_SHARED); 362 IDR_PRINT_PREVIEW_IMAGES_MOBILE_SHARED);
363 source->SetDefaultResource(IDR_PRINT_PREVIEW_HTML); 363 source->SetDefaultResource(IDR_PRINT_PREVIEW_HTML);
364 source->SetRequestFilter(base::Bind(&HandleRequestCallback)); 364 source->SetRequestFilter(base::Bind(&HandleRequestCallback));
365 source->OverrideContentSecurityPolicyObjectSrc("object-src 'self';"); 365 source->OverrideContentSecurityPolicyObjectSrc("object-src 'self';");
366 source->AddLocalizedString("moreOptionsLabel", IDS_MORE_OPTIONS_LABEL);
367 source->AddLocalizedString("lessOptionsLabel", IDS_LESS_OPTIONS_LABEL);
366 return source; 368 return source;
367 } 369 }
368 370
369 PrintPreviewUI::TestingDelegate* g_testing_delegate = NULL; 371 PrintPreviewUI::TestingDelegate* g_testing_delegate = NULL;
370 372
371 } // namespace 373 } // namespace
372 374
373 PrintPreviewUI::PrintPreviewUI(content::WebUI* web_ui) 375 PrintPreviewUI::PrintPreviewUI(content::WebUI* web_ui)
374 : ConstrainedWebDialogUI(web_ui), 376 : ConstrainedWebDialogUI(web_ui),
375 initial_preview_start_time_(base::TimeTicks::Now()), 377 initial_preview_start_time_(base::TimeTicks::Now()),
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 } 632 }
631 633
632 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { 634 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) {
633 handler_->FileSelected(path, 0, NULL); 635 handler_->FileSelected(path, 0, NULL);
634 } 636 }
635 637
636 void PrintPreviewUI::SetPdfSavedClosureForTesting( 638 void PrintPreviewUI::SetPdfSavedClosureForTesting(
637 const base::Closure& closure) { 639 const base::Closure& closure) {
638 handler_->SetPdfSavedClosureForTesting(closure); 640 handler_->SetPdfSavedClosureForTesting(closure);
639 } 641 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/settings/settings_section.js ('k') | chrome/test/data/webui/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698