OLD | NEW |
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/copresence_ui_handler.h" | 5 #include "chrome/browser/ui/webui/copresence_ui_handler.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 #include <utility> | 10 #include <utility> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/bind.h" | 13 #include "base/bind.h" |
13 #include "base/i18n/time_formatting.h" | 14 #include "base/i18n/time_formatting.h" |
14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "chrome/browser/extensions/api/copresence/copresence_api.h" | 17 #include "chrome/browser/extensions/api/copresence/copresence_api.h" |
17 #include "components/copresence/proto/data.pb.h" | 18 #include "components/copresence/proto/data.pb.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 205 |
205 // CopresenceService::ResetState() deletes the CopresenceState object | 206 // CopresenceService::ResetState() deletes the CopresenceState object |
206 // we were using. We have to get the new one and reconnect to it. | 207 // we were using. We have to get the new one and reconnect to it. |
207 state_ = GetCopresenceState(service); | 208 state_ = GetCopresenceState(service); |
208 DCHECK(state_); | 209 DCHECK(state_); |
209 state_->AddObserver(this); | 210 state_->AddObserver(this); |
210 | 211 |
211 web_ui()->CallJavascriptFunctionUnsafe("clearTokens"); | 212 web_ui()->CallJavascriptFunctionUnsafe("clearTokens"); |
212 DirectivesUpdated(); | 213 DirectivesUpdated(); |
213 } | 214 } |
OLD | NEW |