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

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

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/date_time_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/set_time_dialog.h" 10 #include "chrome/browser/chromeos/set_time_dialog.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void DateTimeOptionsHandler::RegisterMessages() { 52 void DateTimeOptionsHandler::RegisterMessages() {
53 // Callback for set time button. 53 // Callback for set time button.
54 web_ui()->RegisterMessageCallback( 54 web_ui()->RegisterMessageCallback(
55 "showSetTime", 55 "showSetTime",
56 base::Bind(&DateTimeOptionsHandler::HandleShowSetTime, 56 base::Bind(&DateTimeOptionsHandler::HandleShowSetTime,
57 base::Unretained(this))); 57 base::Unretained(this)));
58 } 58 }
59 59
60 void DateTimeOptionsHandler::SystemClockCanSetTimeChanged(bool can_set_time) { 60 void DateTimeOptionsHandler::SystemClockCanSetTimeChanged(bool can_set_time) {
61 if (page_initialized_) { 61 if (page_initialized_) {
62 web_ui()->CallJavascriptFunctionUnsafe( 62 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.setCanSetTime",
63 "BrowserOptions.setCanSetTime", base::FundamentalValue(can_set_time)); 63 base::Value(can_set_time));
64 } 64 }
65 can_set_time_ = can_set_time; 65 can_set_time_ = can_set_time;
66 } 66 }
67 67
68 void DateTimeOptionsHandler::HandleShowSetTime(const base::ListValue* args) { 68 void DateTimeOptionsHandler::HandleShowSetTime(const base::ListValue* args) {
69 // Make sure the clock status hasn't changed since the button was clicked. 69 // Make sure the clock status hasn't changed since the button was clicked.
70 if (can_set_time_) { 70 if (can_set_time_) {
71 SetTimeDialog::ShowDialogInParent( 71 SetTimeDialog::ShowDialogInParent(
72 web_ui()->GetWebContents()->GetTopLevelNativeWindow()); 72 web_ui()->GetWebContents()->GetTopLevelNativeWindow());
73 } 73 }
74 } 74 }
75 75
76 } // namespace options 76 } // namespace options
77 } // namespace chromeos 77 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698