OLD | NEW |
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/options/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 #include "components/prefs/pref_service.h" | 76 #include "components/prefs/pref_service.h" |
77 #include "components/prefs/scoped_user_pref_update.h" | 77 #include "components/prefs/scoped_user_pref_update.h" |
78 #include "components/proximity_auth/switches.h" | 78 #include "components/proximity_auth/switches.h" |
79 #include "components/proxy_config/proxy_config_pref_names.h" | 79 #include "components/proxy_config/proxy_config_pref_names.h" |
80 #include "components/search_engines/template_url.h" | 80 #include "components/search_engines/template_url.h" |
81 #include "components/search_engines/template_url_service.h" | 81 #include "components/search_engines/template_url_service.h" |
82 #include "components/signin/core/browser/signin_manager.h" | 82 #include "components/signin/core/browser/signin_manager.h" |
83 #include "components/signin/core/common/profile_management_switches.h" | 83 #include "components/signin/core/common/profile_management_switches.h" |
84 #include "components/signin/core/common/signin_pref_names.h" | 84 #include "components/signin/core/common/signin_pref_names.h" |
85 #include "components/strings/grit/components_strings.h" | 85 #include "components/strings/grit/components_strings.h" |
86 #include "components/ui/zoom/page_zoom.h" | |
87 #include "components/user_manager/user_type.h" | 86 #include "components/user_manager/user_type.h" |
| 87 #include "components/zoom/page_zoom.h" |
88 #include "content/public/browser/browser_thread.h" | 88 #include "content/public/browser/browser_thread.h" |
89 #include "content/public/browser/download_manager.h" | 89 #include "content/public/browser/download_manager.h" |
90 #include "content/public/browser/navigation_controller.h" | 90 #include "content/public/browser/navigation_controller.h" |
91 #include "content/public/browser/notification_details.h" | 91 #include "content/public/browser/notification_details.h" |
92 #include "content/public/browser/notification_service.h" | 92 #include "content/public/browser/notification_service.h" |
93 #include "content/public/browser/notification_source.h" | 93 #include "content/public/browser/notification_source.h" |
94 #include "content/public/browser/notification_types.h" | 94 #include "content/public/browser/notification_types.h" |
95 #include "content/public/browser/url_data_source.h" | 95 #include "content/public/browser/url_data_source.h" |
96 #include "content/public/browser/user_metrics.h" | 96 #include "content/public/browser/user_metrics.h" |
97 #include "content/public/browser/web_contents.h" | 97 #include "content/public/browser/web_contents.h" |
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1980 void BrowserOptionsHandler::SetupPageZoomSelector() { | 1980 void BrowserOptionsHandler::SetupPageZoomSelector() { |
1981 double default_zoom_level = | 1981 double default_zoom_level = |
1982 content::HostZoomMap::GetDefaultForBrowserContext( | 1982 content::HostZoomMap::GetDefaultForBrowserContext( |
1983 Profile::FromWebUI(web_ui()))->GetDefaultZoomLevel(); | 1983 Profile::FromWebUI(web_ui()))->GetDefaultZoomLevel(); |
1984 double default_zoom_factor = | 1984 double default_zoom_factor = |
1985 content::ZoomLevelToZoomFactor(default_zoom_level); | 1985 content::ZoomLevelToZoomFactor(default_zoom_level); |
1986 | 1986 |
1987 // Generate a vector of zoom factors from an array of known presets along with | 1987 // Generate a vector of zoom factors from an array of known presets along with |
1988 // the default factor added if necessary. | 1988 // the default factor added if necessary. |
1989 std::vector<double> zoom_factors = | 1989 std::vector<double> zoom_factors = |
1990 ui_zoom::PageZoom::PresetZoomFactors(default_zoom_factor); | 1990 zoom::PageZoom::PresetZoomFactors(default_zoom_factor); |
1991 | 1991 |
1992 // Iterate through the zoom factors and and build the contents of the | 1992 // Iterate through the zoom factors and and build the contents of the |
1993 // selector that will be sent to the javascript handler. | 1993 // selector that will be sent to the javascript handler. |
1994 // Each item in the list has the following parameters: | 1994 // Each item in the list has the following parameters: |
1995 // 1. Title (string). | 1995 // 1. Title (string). |
1996 // 2. Value (double). | 1996 // 2. Value (double). |
1997 // 3. Is selected? (bool). | 1997 // 3. Is selected? (bool). |
1998 base::ListValue zoom_factors_value; | 1998 base::ListValue zoom_factors_value; |
1999 for (std::vector<double>::const_iterator i = zoom_factors.begin(); | 1999 for (std::vector<double>::const_iterator i = zoom_factors.begin(); |
2000 i != zoom_factors.end(); ++i) { | 2000 i != zoom_factors.end(); ++i) { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2179 | 2179 |
2180 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2180 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
2181 #if defined(OS_CHROMEOS) | 2181 #if defined(OS_CHROMEOS) |
2182 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2182 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
2183 #else | 2183 #else |
2184 return true; | 2184 return true; |
2185 #endif | 2185 #endif |
2186 } | 2186 } |
2187 | 2187 |
2188 } // namespace options | 2188 } // namespace options |
OLD | NEW |