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

Side by Side Diff: android_webview/browser/shared_renderer_state.h

Issue 509453002: android_webview : Class member variable WeakPtrFactory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_
6 #define ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ 6 #define ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_
7 7
8 #include "android_webview/browser/parent_compositor_draw_constraints.h" 8 #include "android_webview/browser/parent_compositor_draw_constraints.h"
9 #include "base/cancelable_callback.h" 9 #include "base/cancelable_callback.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 friend class InsideHardwareReleaseReset; 75 friend class InsideHardwareReleaseReset;
76 friend class internal::RequestDrawGLTracker; 76 friend class internal::RequestDrawGLTracker;
77 77
78 void ResetRequestDrawGLCallback(); 78 void ResetRequestDrawGLCallback();
79 void ClientRequestDrawGLOnUIThread(); 79 void ClientRequestDrawGLOnUIThread();
80 void UpdateParentDrawConstraintsOnUIThread(); 80 void UpdateParentDrawConstraintsOnUIThread();
81 void SetInsideHardwareRelease(bool inside); 81 void SetInsideHardwareRelease(bool inside);
82 82
83 scoped_refptr<base::MessageLoopProxy> ui_loop_; 83 scoped_refptr<base::MessageLoopProxy> ui_loop_;
84 BrowserViewRendererClient* client_on_ui_; 84 BrowserViewRendererClient* client_on_ui_;
85 base::WeakPtrFactory<SharedRendererState> weak_factory_on_ui_thread_;
86 base::WeakPtr<SharedRendererState> ui_thread_weak_ptr_; 85 base::WeakPtr<SharedRendererState> ui_thread_weak_ptr_;
87 base::CancelableClosure request_draw_gl_cancelable_closure_; 86 base::CancelableClosure request_draw_gl_cancelable_closure_;
88 87
89 // Accessed by both UI and RT thread. 88 // Accessed by both UI and RT thread.
90 mutable base::Lock lock_; 89 mutable base::Lock lock_;
91 scoped_ptr<DrawGLInput> draw_gl_input_; 90 scoped_ptr<DrawGLInput> draw_gl_input_;
92 bool inside_hardware_release_; 91 bool inside_hardware_release_;
93 ParentCompositorDrawConstraints parent_draw_constraints_; 92 ParentCompositorDrawConstraints parent_draw_constraints_;
94 gpu::GLInProcessContext* share_context_; 93 gpu::GLInProcessContext* share_context_;
95 cc::ReturnedResourceArray returned_resources_; 94 cc::ReturnedResourceArray returned_resources_;
96 base::Closure request_draw_gl_closure_; 95 base::Closure request_draw_gl_closure_;
96 base::WeakPtrFactory<SharedRendererState> weak_factory_on_ui_thread_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(SharedRendererState); 98 DISALLOW_COPY_AND_ASSIGN(SharedRendererState);
99 }; 99 };
100 100
101 class InsideHardwareReleaseReset { 101 class InsideHardwareReleaseReset {
102 public: 102 public:
103 explicit InsideHardwareReleaseReset( 103 explicit InsideHardwareReleaseReset(
104 SharedRendererState* shared_renderer_state); 104 SharedRendererState* shared_renderer_state);
105 ~InsideHardwareReleaseReset(); 105 ~InsideHardwareReleaseReset();
106 106
107 private: 107 private:
108 SharedRendererState* shared_renderer_state_; 108 SharedRendererState* shared_renderer_state_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(InsideHardwareReleaseReset); 110 DISALLOW_COPY_AND_ASSIGN(InsideHardwareReleaseReset);
111 }; 111 };
112 112
113 } // namespace android_webview 113 } // namespace android_webview
114 114
115 #endif // ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ 115 #endif // ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698