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

Side by Side Diff: blimp/client/public/blimp_client_context.h

Issue 2204223005: Blimp OAuth2 token retreival on application start up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build config. Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_ 5 #ifndef BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_
6 #define BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_ 6 #define BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "blimp/client/public/blimp_client_context_delegate.h" 12 #include "blimp/client/public/blimp_client_context_delegate.h"
13 #include "blimp/client/public/contents/blimp_contents.h" 13 #include "blimp/client/public/contents/blimp_contents.h"
14 #include "components/keyed_service/core/keyed_service.h" 14 #include "components/keyed_service/core/keyed_service.h"
15 #include "google_apis/gaia/identity_provider.h"
15 16
16 #if defined(OS_ANDROID) 17 #if defined(OS_ANDROID)
17 #include "base/android/jni_android.h" 18 #include "base/android/jni_android.h"
18 #endif // defined(OS_ANDROID) 19 #endif // defined(OS_ANDROID)
19 20
20 namespace base { 21 namespace base {
21 class SupportsUserData; 22 class SupportsUserData;
22 } 23 }
23 24
24 namespace blimp { 25 namespace blimp {
(...skipping 18 matching lines...) Expand all
43 // operations. 44 // operations.
44 static BlimpClientContext* Create( 45 static BlimpClientContext* Create(
45 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner); 46 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner);
46 47
47 // The delegate provides all the required functionality from the embedder. 48 // The delegate provides all the required functionality from the embedder.
48 virtual void SetDelegate(BlimpClientContextDelegate* delegate) = 0; 49 virtual void SetDelegate(BlimpClientContextDelegate* delegate) = 0;
49 50
50 // Creates a new BlimpContents. 51 // Creates a new BlimpContents.
51 virtual std::unique_ptr<BlimpContents> CreateBlimpContents() = 0; 52 virtual std::unique_ptr<BlimpContents> CreateBlimpContents() = 0;
52 53
54 // Create OAuth2 token authenticator.
55 virtual void CreateAuthenticator(
nyquist 2016/08/10 01:20:34 Could you move this to the BlimpClientContextDeleg
xingliu 2016/08/10 21:03:15 Done. This is great idea.
56 std::unique_ptr<IdentityProvider> identity_provider) = 0;
57
53 protected: 58 protected:
54 BlimpClientContext() = default; 59 BlimpClientContext() = default;
55 60
56 private: 61 private:
57 DISALLOW_COPY_AND_ASSIGN(BlimpClientContext); 62 DISALLOW_COPY_AND_ASSIGN(BlimpClientContext);
58 }; 63 };
59 64
60 } // namespace client 65 } // namespace client
61 } // namespace blimp 66 } // namespace blimp
62 67
63 #endif // BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_ 68 #endif // BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698