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

Side by Side Diff: blimp/net/browser_connection_handler.h

Issue 1933053003: Used oneof in blimp_message.proto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compared specific 'case' field into DCHECKs Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_NET_BROWSER_CONNECTION_HANDLER_H_ 5 #ifndef BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_
6 #define BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_ 6 #define BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 24 matching lines...) Expand all
35 BrowserConnectionHandler(); 35 BrowserConnectionHandler();
36 ~BrowserConnectionHandler() override; 36 ~BrowserConnectionHandler() override;
37 37
38 // Registers a message processor which will receive all messages of the |type| 38 // Registers a message processor which will receive all messages of the |type|
39 // specified. Only one handler may be added per type. 39 // specified. Only one handler may be added per type.
40 // That caller must ensure |incoming_processor| remains valid while 40 // That caller must ensure |incoming_processor| remains valid while
41 // this object is in-use. 41 // this object is in-use.
42 // 42 //
43 // Returns a BlimpMessageProcessor object for sending messages of type |type|. 43 // Returns a BlimpMessageProcessor object for sending messages of type |type|.
44 virtual std::unique_ptr<BlimpMessageProcessor> RegisterFeature( 44 virtual std::unique_ptr<BlimpMessageProcessor> RegisterFeature(
45 BlimpMessage::Type type, 45 BlimpMessage::FeatureCase type,
46 BlimpMessageProcessor* incoming_processor); 46 BlimpMessageProcessor* incoming_processor);
47 47
48 // ConnectionHandler implementation. 48 // ConnectionHandler implementation.
49 void HandleConnection(std::unique_ptr<BlimpConnection> connection) override; 49 void HandleConnection(std::unique_ptr<BlimpConnection> connection) override;
50 50
51 // ConnectionErrorObserver implementation. 51 // ConnectionErrorObserver implementation.
52 void OnConnectionError(int error) override; 52 void OnConnectionError(int error) override;
53 53
54 private: 54 private:
55 void DropCurrentConnection(); 55 void DropCurrentConnection();
(...skipping 14 matching lines...) Expand all
70 70
71 // Holds network resources while there is a Client connected. 71 // Holds network resources while there is a Client connected.
72 std::unique_ptr<BlimpConnection> connection_; 72 std::unique_ptr<BlimpConnection> connection_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(BrowserConnectionHandler); 74 DISALLOW_COPY_AND_ASSIGN(BrowserConnectionHandler);
75 }; 75 };
76 76
77 } // namespace blimp 77 } // namespace blimp
78 78
79 #endif // BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_ 79 #endif // BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698