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

Side by Side Diff: chrome/browser/ui/webui/options/advanced_options_handler.cc

Issue 7485011: Virtual Cloud Print Driver for Mac. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 5 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) 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/ui/webui/options/advanced_options_handler.h" 5 #include "chrome/browser/ui/webui/options/advanced_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 24 matching lines...) Expand all
35 #include "grit/generated_resources.h" 35 #include "grit/generated_resources.h"
36 #include "grit/locale_settings.h" 36 #include "grit/locale_settings.h"
37 #include "ui/base/l10n/l10n_util.h" 37 #include "ui/base/l10n/l10n_util.h"
38 38
39 #if !defined(OS_CHROMEOS) 39 #if !defined(OS_CHROMEOS)
40 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" 40 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h"
41 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" 41 #include "chrome/browser/ui/webui/options/advanced_options_utils.h"
42 #endif 42 #endif
43 43
44 AdvancedOptionsHandler::AdvancedOptionsHandler() { 44 AdvancedOptionsHandler::AdvancedOptionsHandler() {
45 #if (defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)) || defined(OS_MACOSX) 45
46 #if(!defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN))
47 // On Windows, we need the PDF plugin which is only guaranteed to exist on
48 // Google Chrome builds. Use a command-line switch for Windows non-Google
49 // Chrome builds.
50 cloud_print_proxy_ui_enabled_ = CommandLine::ForCurrentProcess()->HasSwitch(
51 switches::kEnableCloudPrintProxy);
52 #elif(!defined(OS_CHROMEOS))
53 // Always enabled for Mac, Linux and Google Chrome Windows builds.
46 cloud_print_proxy_ui_enabled_ = true; 54 cloud_print_proxy_ui_enabled_ = true;
47 #elif !defined(OS_CHROMEOS)
48 cloud_print_proxy_ui_enabled_ =
49 CommandLine::ForCurrentProcess()->HasSwitch(
50 switches::kEnableCloudPrintProxy);
51 #endif 55 #endif
52 } 56 }
53 57
54 AdvancedOptionsHandler::~AdvancedOptionsHandler() { 58 AdvancedOptionsHandler::~AdvancedOptionsHandler() {
55 // There may be pending file dialogs, we need to tell them that we've gone 59 // There may be pending file dialogs, we need to tell them that we've gone
56 // away so they don't try and call back to us. 60 // away so they don't try and call back to us.
57 if (select_folder_dialog_.get()) 61 if (select_folder_dialog_.get())
58 select_folder_dialog_->ListenerDestroyed(); 62 select_folder_dialog_->ListenerDestroyed();
59 } 63 }
60 64
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 web_ui_->CallJavascriptFunction( 636 web_ui_->CallJavascriptFunction(
633 "options.AdvancedOptions.SetUseSSL3CheckboxState", checked, disabled); 637 "options.AdvancedOptions.SetUseSSL3CheckboxState", checked, disabled);
634 } 638 }
635 { 639 {
636 FundamentalValue checked(tls1_enabled_.GetValue()); 640 FundamentalValue checked(tls1_enabled_.GetValue());
637 FundamentalValue disabled(tls1_enabled_.IsManaged()); 641 FundamentalValue disabled(tls1_enabled_.IsManaged());
638 web_ui_->CallJavascriptFunction( 642 web_ui_->CallJavascriptFunction(
639 "options.AdvancedOptions.SetUseTLS1CheckboxState", checked, disabled); 643 "options.AdvancedOptions.SetUseTLS1CheckboxState", checked, disabled);
640 } 644 }
641 } 645 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698