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

Side by Side Diff: content/child/webparserresourcebridge_impl.h

Issue 109283006: Redirect HTML resource bytes directly to parser thread (Chrome side CL) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_CHILD_WEBPARSERRESOURCEBRIDGE_IMPL_H_
6 #define CONTENT_CHILD_WEBPARSERRESOURCEBRIDGE_IMPL_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/memory/linked_ptr.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/shared_memory.h"
13 #include "base/memory/weak_ptr.h"
14 #include "content/common/content_export.h"
15 #include "ipc/ipc_channel_proxy.h"
16 #include "third_party/WebKit/public/platform/WebParserResourceBridge.h"
17
18 namespace blink {
19 class WebThread;
jam 2013/12/17 00:44:40 no need to forward declare classes that are used i
oystein (OOO til 10th of July) 2013/12/17 01:07:27 Done.
20 }
21
22 namespace webkit_glue {
23 class WebThreadImpl;
jam 2013/12/17 00:44:40 nit: no indentation in forward declarations
oystein (OOO til 10th of July) 2013/12/17 01:07:27 Done.
24 }
25
26 namespace content {
27 class ResourceDispatcher;
28
29 class CONTENT_EXPORT WebParserResourceBridgeImpl :
jam 2013/12/17 00:44:40 i don't think you need a CONTENT_EXPORT here since
oystein (OOO til 10th of July) 2013/12/17 01:07:27 Done.
30 NON_EXPORTED_BASE(public blink::WebParserResourceBridge) {
31 public:
32 WebParserResourceBridgeImpl(
33 int request_id,
34 base::WeakPtr<ResourceDispatcher> resource_dispatcher,
35 base::SharedMemoryHandle shm_handle,
36 int shm_size);
37 virtual ~WebParserResourceBridgeImpl();
38
39 // From blink::WebParserResourceBridge
40 virtual void setPeer(blink::WebParserResourceBridge::Peer* peer) OVERRIDE;
41 virtual blink::WebThread* getParserThread() OVERRIDE;
42
43 void OnReceivedData(int data_offset,
jam 2013/12/17 00:44:40 nit: this can be made private?
oystein (OOO til 10th of July) 2013/12/17 01:07:27 It's called by ParserResourceMessageFilter::OnRece
44 int data_length,
45 int encoded_data_length);
46 void CreateSharedMemoryBuffer();
jam 2013/12/17 00:44:40 ditto
oystein (OOO til 10th of July) 2013/12/17 01:07:27 Done.
47
48 private:
49 static webkit_glue::WebThreadImpl& parser_thread();
jam 2013/12/17 00:44:40 this can just be a static method in the cc file in
oystein (OOO til 10th of July) 2013/12/17 01:07:27 Done.
50
51 scoped_refptr<IPC::ChannelProxy::MessageFilter> filter_;
52 blink::WebParserResourceBridge::Peer* peer_;
53 base::SharedMemoryHandle shm_handle_;
54 int shm_size_;
55 linked_ptr<base::SharedMemory> shm_buffer_;
56 base::WeakPtrFactory<WebParserResourceBridgeImpl> weak_factory_;
57
58 DISALLOW_COPY_AND_ASSIGN(WebParserResourceBridgeImpl);
59 };
60
61 } // namespace content
62
63 #endif // CONTENT_CHILD_WEBPARSERRESOURCEBRIDGE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698