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

Side by Side Diff: chrome/browser/ui/webui/options2/browser_options_handler2.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/options2/browser_options_handler2.h" 5 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/memory/singleton.h" 14 #include "base/memory/singleton.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/stl_util.h" 16 #include "base/stl_util.h"
17 #include "base/string_number_conversions.h" 17 #include "base/string_number_conversions.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "base/value_conversions.h"
19 #include "base/values.h" 20 #include "base/values.h"
20 #include "base/value_conversions.h"
21 #include "chrome/browser/auto_launch_trial.h" 21 #include "chrome/browser/auto_launch_trial.h"
22 #include "chrome/browser/browser_process.h" 22 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/chrome_page_zoom.h" 23 #include "chrome/browser/chrome_page_zoom.h"
24 #include "chrome/browser/custom_home_pages_table_model.h" 24 #include "chrome/browser/custom_home_pages_table_model.h"
25 #include "chrome/browser/download/download_prefs.h" 25 #include "chrome/browser/download/download_prefs.h"
26 #include "chrome/browser/instant/instant_controller.h" 26 #include "chrome/browser/instant/instant_controller.h"
27 #include "chrome/browser/net/url_fixer_upper.h" 27 #include "chrome/browser/net/url_fixer_upper.h"
28 #include "chrome/browser/prefs/pref_service.h" 28 #include "chrome/browser/prefs/pref_service.h"
29 #include "chrome/browser/prefs/session_startup_pref.h" 29 #include "chrome/browser/prefs/session_startup_pref.h"
30 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 30 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #include "chrome/browser/ui/webui/options2/advanced_options_utils2.h" 80 #include "chrome/browser/ui/webui/options2/advanced_options_utils2.h"
81 #endif 81 #endif
82 82
83 #if defined(OS_CHROMEOS) 83 #if defined(OS_CHROMEOS)
84 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 84 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
85 #include "chrome/browser/chromeos/cros_settings.h" 85 #include "chrome/browser/chromeos/cros_settings.h"
86 #include "chrome/browser/chromeos/login/user_manager.h" 86 #include "chrome/browser/chromeos/login/user_manager.h"
87 #include "chrome/browser/chromeos/options/take_photo_dialog.h" 87 #include "chrome/browser/chromeos/options/take_photo_dialog.h"
88 #include "chrome/browser/ui/browser_window.h" 88 #include "chrome/browser/ui/browser_window.h"
89 #include "chrome/browser/ui/webui/options2/chromeos/system_settings_provider2.h" 89 #include "chrome/browser/ui/webui/options2/chromeos/system_settings_provider2.h"
90 #include "third_party/skia/include/core/SkBitmap.h" 90 #include "ui/gfx/image/image_skia.h"
91 #endif // defined(OS_CHROMEOS) 91 #endif // defined(OS_CHROMEOS)
92 92
93 #if defined(OS_WIN) 93 #if defined(OS_WIN)
94 #include "chrome/installer/util/auto_launch_util.h" 94 #include "chrome/installer/util/auto_launch_util.h"
95 #endif // defined(OS_WIN) 95 #endif // defined(OS_WIN)
96 96
97 #if defined(TOOLKIT_GTK) 97 #if defined(TOOLKIT_GTK)
98 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 98 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
99 #endif // defined(TOOLKIT_GTK) 99 #endif // defined(TOOLKIT_GTK)
100 100
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 profile_value->SetBoolean("isCurrentProfile", 905 profile_value->SetBoolean("isCurrentProfile",
906 profile_path == current_profile_path); 906 profile_path == current_profile_path);
907 907
908 bool is_gaia_picture = 908 bool is_gaia_picture =
909 cache.IsUsingGAIAPictureOfProfileAtIndex(i) && 909 cache.IsUsingGAIAPictureOfProfileAtIndex(i) &&
910 cache.GetGAIAPictureOfProfileAtIndex(i); 910 cache.GetGAIAPictureOfProfileAtIndex(i);
911 if (is_gaia_picture) { 911 if (is_gaia_picture) {
912 gfx::Image icon = profiles::GetAvatarIconForWebUI( 912 gfx::Image icon = profiles::GetAvatarIconForWebUI(
913 cache.GetAvatarIconOfProfileAtIndex(i), true); 913 cache.GetAvatarIconOfProfileAtIndex(i), true);
914 profile_value->SetString("iconURL", 914 profile_value->SetString("iconURL",
915 web_ui_util::GetImageDataUrl(*icon.ToSkBitmap())); 915 web_ui_util::GetImageDataUrl(*icon.ToImageSkia()));
916 } else { 916 } else {
917 size_t icon_index = cache.GetAvatarIconIndexOfProfileAtIndex(i); 917 size_t icon_index = cache.GetAvatarIconIndexOfProfileAtIndex(i);
918 profile_value->SetString("iconURL", 918 profile_value->SetString("iconURL",
919 cache.GetDefaultAvatarIconUrl(icon_index)); 919 cache.GetDefaultAvatarIconUrl(icon_index));
920 } 920 }
921 921
922 profile_info_list->Append(profile_value); 922 profile_info_list->Append(profile_value);
923 } 923 }
924 924
925 return profile_info_list.Pass(); 925 return profile_info_list.Pass();
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 } 1407 }
1408 1408
1409 void BrowserOptionsHandler::SetupSSLConfigSettings() { 1409 void BrowserOptionsHandler::SetupSSLConfigSettings() {
1410 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); 1410 base::FundamentalValue checked(rev_checking_enabled_.GetValue());
1411 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); 1411 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged());
1412 web_ui()->CallJavascriptFunction( 1412 web_ui()->CallJavascriptFunction(
1413 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); 1413 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled);
1414 } 1414 }
1415 1415
1416 } // namespace options2 1416 } // namespace options2
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_login_handler.cc ('k') | chrome/browser/ui/webui/options2/manage_profile_handler2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698