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

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

Issue 211333005: Launch easy unlock setup app from chrome://settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « chrome/browser/signin/easy_unlock_controller.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 "apps/app_window.h" 10 #include "apps/app_window.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "chrome/browser/profiles/profile_metrics.h" 44 #include "chrome/browser/profiles/profile_metrics.h"
45 #include "chrome/browser/profiles/profile_shortcut_manager.h" 45 #include "chrome/browser/profiles/profile_shortcut_manager.h"
46 #include "chrome/browser/profiles/profile_window.h" 46 #include "chrome/browser/profiles/profile_window.h"
47 #include "chrome/browser/profiles/profiles_state.h" 47 #include "chrome/browser/profiles/profiles_state.h"
48 #include "chrome/browser/search/hotword_service.h" 48 #include "chrome/browser/search/hotword_service.h"
49 #include "chrome/browser/search/hotword_service_factory.h" 49 #include "chrome/browser/search/hotword_service_factory.h"
50 #include "chrome/browser/search/search.h" 50 #include "chrome/browser/search/search.h"
51 #include "chrome/browser/search_engines/template_url.h" 51 #include "chrome/browser/search_engines/template_url.h"
52 #include "chrome/browser/search_engines/template_url_service.h" 52 #include "chrome/browser/search_engines/template_url_service.h"
53 #include "chrome/browser/search_engines/template_url_service_factory.h" 53 #include "chrome/browser/search_engines/template_url_service_factory.h"
54 #include "chrome/browser/signin/easy_unlock.h"
54 #include "chrome/browser/signin/signin_manager.h" 55 #include "chrome/browser/signin/signin_manager.h"
55 #include "chrome/browser/signin/signin_manager_factory.h" 56 #include "chrome/browser/signin/signin_manager_factory.h"
56 #include "chrome/browser/sync/profile_sync_service.h" 57 #include "chrome/browser/sync/profile_sync_service.h"
57 #include "chrome/browser/sync/profile_sync_service_factory.h" 58 #include "chrome/browser/sync/profile_sync_service_factory.h"
58 #include "chrome/browser/sync/sync_ui_util.h" 59 #include "chrome/browser/sync/sync_ui_util.h"
59 #include "chrome/browser/themes/theme_service.h" 60 #include "chrome/browser/themes/theme_service.h"
60 #include "chrome/browser/themes/theme_service_factory.h" 61 #include "chrome/browser/themes/theme_service_factory.h"
61 #include "chrome/browser/ui/browser_finder.h" 62 #include "chrome/browser/ui/browser_finder.h"
62 #include "chrome/browser/ui/chrome_select_file_policy.h" 63 #include "chrome/browser/ui/chrome_select_file_policy.h"
63 #include "chrome/browser/ui/host_desktop.h" 64 #include "chrome/browser/ui/host_desktop.h"
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 base::StringValue error_message(l10n_util::GetStringUTF16( 1601 base::StringValue error_message(l10n_util::GetStringUTF16(
1601 IDS_HOTWORD_GENERIC_ERROR_MESSAGE)); 1602 IDS_HOTWORD_GENERIC_ERROR_MESSAGE));
1602 web_ui()->CallJavascriptFunction("BrowserOptions.showHotwordSection", 1603 web_ui()->CallJavascriptFunction("BrowserOptions.showHotwordSection",
1603 error_message); 1604 error_message);
1604 } 1605 }
1605 } 1606 }
1606 } 1607 }
1607 1608
1608 void BrowserOptionsHandler::HandleLaunchEasyUnlockSetup( 1609 void BrowserOptionsHandler::HandleLaunchEasyUnlockSetup(
1609 const base::ListValue* args) { 1610 const base::ListValue* args) {
1610 // TODO(tengs): launch Easy Unlock setup flow. 1611 easy_unlock::LaunchEasyUnlockSetup(Profile::FromWebUI(web_ui()));
1611 } 1612 }
1612 1613
1613 void BrowserOptionsHandler::HandleRequestHotwordSetupRetry( 1614 void BrowserOptionsHandler::HandleRequestHotwordSetupRetry(
1614 const base::ListValue* args) { 1615 const base::ListValue* args) {
1615 // TODO(joshtrask): invoke BrowserOptions.showHotwordSection again, passing 1616 // TODO(joshtrask): invoke BrowserOptions.showHotwordSection again, passing
1616 // the new error message if any. 1617 // the new error message if any.
1617 HotwordServiceFactory::RetryHotwordExtension(Profile::FromWebUI(web_ui())); 1618 HotwordServiceFactory::RetryHotwordExtension(Profile::FromWebUI(web_ui()));
1618 } 1619 }
1619 1620
1620 #if defined(OS_CHROMEOS) 1621 #if defined(OS_CHROMEOS)
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 void BrowserOptionsHandler::SetupEasyUnlock() { 1799 void BrowserOptionsHandler::SetupEasyUnlock() {
1799 bool has_pairing = !Profile::FromWebUI(web_ui())->GetPrefs() 1800 bool has_pairing = !Profile::FromWebUI(web_ui())->GetPrefs()
1800 ->GetDictionary(prefs::kEasyUnlockPairing)->empty(); 1801 ->GetDictionary(prefs::kEasyUnlockPairing)->empty();
1801 base::FundamentalValue has_pairing_value(has_pairing); 1802 base::FundamentalValue has_pairing_value(has_pairing);
1802 web_ui()->CallJavascriptFunction( 1803 web_ui()->CallJavascriptFunction(
1803 "BrowserOptions.updateEasyUnlock", 1804 "BrowserOptions.updateEasyUnlock",
1804 has_pairing_value); 1805 has_pairing_value);
1805 } 1806 }
1806 1807
1807 } // namespace options 1808 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/signin/easy_unlock_controller.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698