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

Side by Side Diff: blimp/client/core/context/blimp_client_context_impl.h

Issue 2391263005: Propagate error messages to UI for blimp. (Closed)
Patch Set: Minor fixes. 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 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_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 5 #ifndef BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
6 #define BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 6 #define BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 26 matching lines...) Expand all
37 class NavigationFeature; 37 class NavigationFeature;
38 class RenderWidgetFeature; 38 class RenderWidgetFeature;
39 class SettingsFeature; 39 class SettingsFeature;
40 class TabControlFeature; 40 class TabControlFeature;
41 41
42 // BlimpClientContextImpl is the implementation of the main context-class for 42 // BlimpClientContextImpl is the implementation of the main context-class for
43 // the blimp client. 43 // the blimp client.
44 class BlimpClientContextImpl 44 class BlimpClientContextImpl
45 : public BlimpClientContext, 45 : public BlimpClientContext,
46 public BlimpSettingsDelegate, 46 public BlimpSettingsDelegate,
47 public BlobImageSerializationProcessor::ErrorDelegate { 47 public BlobImageSerializationProcessor::ErrorDelegate,
48 public NetworkEventObserver {
48 public: 49 public:
49 // The |io_thread_task_runner| must be the task runner to use for IO 50 // The |io_thread_task_runner| must be the task runner to use for IO
50 // operations. 51 // operations.
51 // The |file_thread_task_runner| must be the task runner to use for file 52 // The |file_thread_task_runner| must be the task runner to use for file
52 // operations. 53 // operations.
53 BlimpClientContextImpl( 54 BlimpClientContextImpl(
54 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, 55 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
55 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, 56 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
56 std::unique_ptr<CompositorDependencies> compositor_dependencies); 57 std::unique_ptr<CompositorDependencies> compositor_dependencies);
57 ~BlimpClientContextImpl() override; 58 ~BlimpClientContextImpl() override;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // May be called on any thread. 93 // May be called on any thread.
93 void DropConnection(); 94 void DropConnection();
94 95
95 // Create IdentitySource which provides user sign in states and OAuth2 token 96 // Create IdentitySource which provides user sign in states and OAuth2 token
96 // service. 97 // service.
97 void CreateIdentitySource(); 98 void CreateIdentitySource();
98 99
99 // BlobImageSerializationProcessor::ErrorDelegate implementation. 100 // BlobImageSerializationProcessor::ErrorDelegate implementation.
100 void OnImageDecodeError() override; 101 void OnImageDecodeError() override;
101 102
103 // NetworkEventObserver implementation.
104 void OnConnected() override;
105 void OnDisconnected(int result) override;
106
102 // Provides functionality from the embedder. 107 // Provides functionality from the embedder.
103 BlimpClientContextDelegate* delegate_ = nullptr; 108 BlimpClientContextDelegate* delegate_ = nullptr;
104 109
105 // The task runner to use for IO operations. 110 // The task runner to use for IO operations.
106 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; 111 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_;
107 112
108 // The task runner to use for file operations. 113 // The task runner to use for file operations.
109 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; 114 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_;
110 115
111 // The AssignmentSource is used when the user of BlimpClientContextImpl calls 116 // The AssignmentSource is used when the user of BlimpClientContextImpl calls
(...skipping 28 matching lines...) Expand all
140 145
141 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; 146 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
142 147
143 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); 148 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);
144 }; 149 };
145 150
146 } // namespace client 151 } // namespace client
147 } // namespace blimp 152 } // namespace blimp
148 153
149 #endif // BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 154 #endif // BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
OLDNEW
« no previous file with comments | « blimp/client/app/linux/blimp_client_context_delegate_linux.cc ('k') | blimp/client/core/context/blimp_client_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698