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

Side by Side Diff: content/renderer/mojo/blink_interface_provider_impl.h

Issue 2492833003: Create and use BlinkInterfaceProvider WeakPtrs on the same thread (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | content/renderer/mojo/blink_interface_provider_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_RENDERER_MOJO_BLINK_INTERFACE_PROVIDER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MOJO_BLINK_INTERFACE_PROVIDER_IMPL_H_
6 #define CONTENT_RENDERER_MOJO_BLINK_INTERFACE_PROVIDER_IMPL_H_ 6 #define CONTENT_RENDERER_MOJO_BLINK_INTERFACE_PROVIDER_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // blink::InterfaceProvider override. 32 // blink::InterfaceProvider override.
33 void getInterface(const char* name, 33 void getInterface(const char* name,
34 mojo::ScopedMessagePipeHandle handle) override; 34 mojo::ScopedMessagePipeHandle handle) override;
35 35
36 private: 36 private:
37 const base::WeakPtr<shell::InterfaceProvider> remote_interfaces_; 37 const base::WeakPtr<shell::InterfaceProvider> remote_interfaces_;
38 38
39 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 39 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
40 40
41 // Should only be accessed by Web Worker threads that are using the
42 // blink::Platform-level interface provider.
43 base::WeakPtr<BlinkInterfaceProviderImpl> weak_ptr_;
41 base::WeakPtrFactory<BlinkInterfaceProviderImpl> weak_ptr_factory_; 44 base::WeakPtrFactory<BlinkInterfaceProviderImpl> weak_ptr_factory_;
42 45
43 DISALLOW_COPY_AND_ASSIGN(BlinkInterfaceProviderImpl); 46 DISALLOW_COPY_AND_ASSIGN(BlinkInterfaceProviderImpl);
44 }; 47 };
45 48
46 } // namespace content 49 } // namespace content
47 50
48 #endif // CONTENT_RENDERER_MOJO_BLINK_INTERFACE_PROVIDER_IMPL_H_ 51 #endif // CONTENT_RENDERER_MOJO_BLINK_INTERFACE_PROVIDER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/mojo/blink_interface_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698