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

Side by Side Diff: chrome/browser/android/blimp/chrome_blimp_client_context_delegate.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 CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_
6 #define CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_ 6 #define CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/string16.h"
11 #include "blimp/client/public/blimp_client_context_delegate.h" 12 #include "blimp/client/public/blimp_client_context_delegate.h"
12 13
13 class IdentityProvider; 14 class IdentityProvider;
14 class Profile; 15 class Profile;
15 16
16 namespace blimp { 17 namespace blimp {
17 namespace client { 18 namespace client {
18 class BlimpClientContext; 19 class BlimpClientContext;
19 class BlimpContents; 20 class BlimpContents;
20 } // namespace client 21 } // namespace client
(...skipping 10 matching lines...) Expand all
31 // Unattaches itself from the BlimpClientContext before going away. 32 // Unattaches itself from the BlimpClientContext before going away.
32 ~ChromeBlimpClientContextDelegate() override; 33 ~ChromeBlimpClientContextDelegate() override;
33 34
34 // BlimpClientContextDelegate implementation. 35 // BlimpClientContextDelegate implementation.
35 void AttachBlimpContentsHelpers( 36 void AttachBlimpContentsHelpers(
36 blimp::client::BlimpContents* blimp_contents) override; 37 blimp::client::BlimpContents* blimp_contents) override;
37 void OnAssignmentConnectionAttempted( 38 void OnAssignmentConnectionAttempted(
38 blimp::client::AssignmentRequestResult result, 39 blimp::client::AssignmentRequestResult result,
39 const blimp::client::Assignment& assignment) override; 40 const blimp::client::Assignment& assignment) override;
40 std::unique_ptr<IdentityProvider> CreateIdentityProvider() override; 41 std::unique_ptr<IdentityProvider> CreateIdentityProvider() override;
41 void OnAuthenticationError( 42 void OnAuthenticationError(const GoogleServiceAuthError& error) override;
42 BlimpClientContextDelegate::AuthError error) override; 43 void OnConnected() override;
44 void OnEngineDisconnected(int result) override;
45 void OnNetworkDisconnected(int result) override;
46
47 protected:
48 // Show an alert message in the embedder.
49 virtual void ShowMessage(const base::string16& msg, bool short_message);
43 50
44 private: 51 private:
52 void OnDisconnected(const base::string16& reason);
53
45 // The profile this delegate is used for. 54 // The profile this delegate is used for.
46 Profile* profile_; 55 Profile* profile_;
47 56
48 // The BlimpClientContext this is the delegate for. 57 // The BlimpClientContext this is the delegate for.
49 blimp::client::BlimpClientContext* blimp_client_context_; 58 blimp::client::BlimpClientContext* blimp_client_context_;
50 59
51 DISALLOW_COPY_AND_ASSIGN(ChromeBlimpClientContextDelegate); 60 DISALLOW_COPY_AND_ASSIGN(ChromeBlimpClientContextDelegate);
52 }; 61 };
53 62
54 #endif // CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_ 63 #endif // CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698