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

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

Issue 2441133002: mash: Introduce ShowWebDialogWithContainer for webui dialogs (Closed)
Patch Set: Created 4 years, 2 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 if (page_initialized_) { 61 if (page_initialized_) {
62 web_ui()->CallJavascriptFunctionUnsafe( 62 web_ui()->CallJavascriptFunctionUnsafe(
63 "BrowserOptions.setCanSetTime", base::FundamentalValue(can_set_time)); 63 "BrowserOptions.setCanSetTime", base::FundamentalValue(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::ShowDialog( 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
« chrome/browser/ui/ash/web_dialog_util.cc ('K') | « chrome/browser/ui/ash/web_dialog_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698