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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 #endif | 1587 #endif |
1588 | 1588 |
1589 #if defined(ENABLE_SERVICE_DISCOVERY) | 1589 #if defined(ENABLE_SERVICE_DISCOVERY) |
1590 | 1590 |
1591 void BrowserOptionsHandler::ShowCloudPrintDevicesPage( | 1591 void BrowserOptionsHandler::ShowCloudPrintDevicesPage( |
1592 const base::ListValue* args) { | 1592 const base::ListValue* args) { |
1593 content::RecordAction(UserMetricsAction("Options_CloudPrintDevicesPage")); | 1593 content::RecordAction(UserMetricsAction("Options_CloudPrintDevicesPage")); |
1594 // Navigate in current tab to devices page. | 1594 // Navigate in current tab to devices page. |
1595 OpenURLParams params( | 1595 OpenURLParams params( |
1596 GURL(chrome::kChromeUIDevicesURL), Referrer(), | 1596 GURL(chrome::kChromeUIDevicesURL), Referrer(), |
1597 CURRENT_TAB, content::PAGE_TRANSITION_LINK, false); | 1597 CURRENT_TAB, ui::PAGE_TRANSITION_LINK, false); |
1598 web_ui()->GetWebContents()->OpenURL(params); | 1598 web_ui()->GetWebContents()->OpenURL(params); |
1599 } | 1599 } |
1600 | 1600 |
1601 #endif | 1601 #endif |
1602 | 1602 |
1603 void BrowserOptionsHandler::HandleRequestHotwordAvailable( | 1603 void BrowserOptionsHandler::HandleRequestHotwordAvailable( |
1604 const base::ListValue* args) { | 1604 const base::ListValue* args) { |
1605 Profile* profile = Profile::FromWebUI(web_ui()); | 1605 Profile* profile = Profile::FromWebUI(web_ui()); |
1606 std::string group = base::FieldTrialList::FindFullName("VoiceTrigger"); | 1606 std::string group = base::FieldTrialList::FindFullName("VoiceTrigger"); |
1607 base::FundamentalValue enabled( | 1607 base::FundamentalValue enabled( |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1925 | 1925 |
1926 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, | 1926 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, |
1927 bool disabled) { | 1927 bool disabled) { |
1928 web_ui()->CallJavascriptFunction( | 1928 web_ui()->CallJavascriptFunction( |
1929 "BrowserOptions.setMetricsReportingCheckboxState", | 1929 "BrowserOptions.setMetricsReportingCheckboxState", |
1930 base::FundamentalValue(checked), | 1930 base::FundamentalValue(checked), |
1931 base::FundamentalValue(disabled)); | 1931 base::FundamentalValue(disabled)); |
1932 } | 1932 } |
1933 | 1933 |
1934 } // namespace options | 1934 } // namespace options |
OLD | NEW |