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

Side by Side Diff: ipc/ipc_channel_win.h

Issue 1206093002: Update ChannelReader to use AttachmentBroker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@attachment_broker3_listener
Patch Set: Add an optimization to immediately dispatch messages after translation. Created 5 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 IPC_IPC_CHANNEL_WIN_H_ 5 #ifndef IPC_IPC_CHANNEL_WIN_H_
6 #define IPC_IPC_CHANNEL_WIN_H_ 6 #define IPC_IPC_CHANNEL_WIN_H_
7 7
8 #include "ipc/ipc_channel.h" 8 #include "ipc/ipc_channel.h"
9 9
10 #include <queue> 10 #include <queue>
(...skipping 30 matching lines...) Expand all
41 AttachmentBroker* GetAttachmentBroker() override; 41 AttachmentBroker* GetAttachmentBroker() override;
42 base::ProcessId GetPeerPID() const override; 42 base::ProcessId GetPeerPID() const override;
43 base::ProcessId GetSelfPID() const override; 43 base::ProcessId GetSelfPID() const override;
44 44
45 static bool IsNamedServerInitialized(const std::string& channel_id); 45 static bool IsNamedServerInitialized(const std::string& channel_id);
46 46
47 47
48 private: 48 private:
49 // ChannelReader implementation. 49 // ChannelReader implementation.
50 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override; 50 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override;
51 bool WillDispatchInputMessage(Message* msg) override; 51 bool ShouldDispatchInputMessage(Message* msg) override;
52 bool GetNonBrokeredAttachments(Message* msg) override;
52 bool DidEmptyInputBuffers() override; 53 bool DidEmptyInputBuffers() override;
53 void HandleInternalMessage(const Message& msg) override; 54 void HandleInternalMessage(const Message& msg) override;
54 55
55 static const base::string16 PipeName(const std::string& channel_id, 56 static const base::string16 PipeName(const std::string& channel_id,
56 int32* secret); 57 int32* secret);
57 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); 58 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode);
58 59
59 bool ProcessConnection(); 60 bool ProcessConnection();
60 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, 61 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context,
61 DWORD bytes_written); 62 DWORD bytes_written);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // |broker_| must outlive this instance. 111 // |broker_| must outlive this instance.
111 AttachmentBroker* broker_; 112 AttachmentBroker* broker_;
112 113
113 base::WeakPtrFactory<ChannelWin> weak_factory_; 114 base::WeakPtrFactory<ChannelWin> weak_factory_;
114 DISALLOW_COPY_AND_ASSIGN(ChannelWin); 115 DISALLOW_COPY_AND_ASSIGN(ChannelWin);
115 }; 116 };
116 117
117 } // namespace IPC 118 } // namespace IPC
118 119
119 #endif // IPC_IPC_CHANNEL_WIN_H_ 120 #endif // IPC_IPC_CHANNEL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698