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

Side by Side Diff: remoting/client/plugin/pepper_pin_fetcher.cc

Issue 12518027: Protocol / client plugin changes to support interactively asking for a PIN (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/client/plugin/pepper_pin_fetcher.h"
6
7 #include "remoting/client/plugin/chromoting_instance.h"
8
9 namespace remoting {
10
11 PepperPinFetcher::PepperPinFetcher(base::WeakPtr<ChromotingInstance> parent)
12 : parent_(parent),
13 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
14 }
15
16 PepperPinFetcher::~PepperPinFetcher() {
17 }
18
19 void PepperPinFetcher::FetchPin(
20 const PinFetchedCallback& pin_fetched_callback) {
21 if (parent_) {
22 pin_fetched_callback_ = pin_fetched_callback;
23 parent_->FetchPin(weak_factory_.GetWeakPtr());
24 }
25 }
26
27 void PepperPinFetcher::OnPinFetched(const std::string& pin) {
28 if (!pin_fetched_callback_.is_null()) {
29 pin_fetched_callback_.Run(pin);
30 pin_fetched_callback_.Reset();
31 }
32 }
33
34 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698