OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/login/update_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/update_screen_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/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 web_ui()->CallJavascriptFunction("cr.ui.Oobe.setUpdateMessage", | 106 web_ui()->CallJavascriptFunction("cr.ui.Oobe.setUpdateMessage", |
107 *info_message); | 107 *info_message); |
108 } | 108 } |
109 | 109 |
110 void UpdateScreenHandler::RegisterMessages() { | 110 void UpdateScreenHandler::RegisterMessages() { |
111 #if !defined(OFFICIAL_BUILD) | 111 #if !defined(OFFICIAL_BUILD) |
112 web_ui()->RegisterMessageCallback("cancelUpdate", | 112 web_ui()->RegisterMessageCallback("cancelUpdate", |
113 base::Bind(&UpdateScreenHandler::HandleUpdateCancel, | 113 base::Bind(&UpdateScreenHandler::HandleUpdateCancel, |
114 base::Unretained(this))); | 114 base::Unretained(this))); |
115 #endif | 115 #endif |
| 116 web_ui()->RegisterMessageCallback("skipUpdateEnrollAfterEula", |
| 117 base::Bind(&UpdateScreenHandler::HandleSkipUpdateEnrollAfterEula, |
| 118 base::Unretained(this))); |
116 } | 119 } |
117 | 120 |
118 #if !defined(OFFICIAL_BUILD) | 121 #if !defined(OFFICIAL_BUILD) |
119 void UpdateScreenHandler::HandleUpdateCancel(const base::ListValue* args) { | 122 void UpdateScreenHandler::HandleUpdateCancel(const base::ListValue* args) { |
120 DCHECK(args && args->empty()); | 123 DCHECK(args && args->empty()); |
121 screen_->CancelUpdate(); | 124 screen_->CancelUpdate(); |
122 } | 125 } |
123 #endif | 126 #endif |
124 | 127 |
| 128 void UpdateScreenHandler::HandleSkipUpdateEnrollAfterEula( |
| 129 const base::ListValue* args) { |
| 130 DCHECK(args && args->empty()); |
| 131 screen_->SkipUpdateEnrollAfterEula(); |
| 132 } |
| 133 |
125 } // namespace chromeos | 134 } // namespace chromeos |
OLD | NEW |