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

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: rebase 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 friend class InsideHardwareReleaseReset; 72 friend class InsideHardwareReleaseReset;
73 friend class internal::RequestDrawGLTracker; 73 friend class internal::RequestDrawGLTracker;
74 74
75 void ResetRequestDrawGLCallback(); 75 void ResetRequestDrawGLCallback();
76 void ClientRequestDrawGLOnUIThread(); 76 void ClientRequestDrawGLOnUIThread();
77 void UpdateParentDrawConstraintsOnUIThread(); 77 void UpdateParentDrawConstraintsOnUIThread();
78 void SetInsideHardwareRelease(bool inside); 78 void SetInsideHardwareRelease(bool inside);
79 79
80 scoped_refptr<base::MessageLoopProxy> ui_loop_; 80 scoped_refptr<base::MessageLoopProxy> ui_loop_;
81 BrowserViewRendererClient* client_on_ui_; 81 BrowserViewRendererClient* client_on_ui_;
82 base::WeakPtrFactory<SharedRendererState> weak_factory_on_ui_thread_;
83 base::WeakPtr<SharedRendererState> ui_thread_weak_ptr_; 82 base::WeakPtr<SharedRendererState> ui_thread_weak_ptr_;
84 base::CancelableClosure request_draw_gl_cancelable_closure_; 83 base::CancelableClosure request_draw_gl_cancelable_closure_;
85 84
86 // Accessed by both UI and RT thread. 85 // Accessed by both UI and RT thread.
87 mutable base::Lock lock_; 86 mutable base::Lock lock_;
88 scoped_ptr<DrawGLInput> draw_gl_input_; 87 scoped_ptr<DrawGLInput> draw_gl_input_;
89 bool inside_hardware_release_; 88 bool inside_hardware_release_;
90 ParentCompositorDrawConstraints parent_draw_constraints_; 89 ParentCompositorDrawConstraints parent_draw_constraints_;
91 cc::ReturnedResourceArray returned_resources_; 90 cc::ReturnedResourceArray returned_resources_;
92 base::Closure request_draw_gl_closure_; 91 base::Closure request_draw_gl_closure_;
93 92
93 base::WeakPtrFactory<SharedRendererState> weak_factory_on_ui_thread_;
94
94 DISALLOW_COPY_AND_ASSIGN(SharedRendererState); 95 DISALLOW_COPY_AND_ASSIGN(SharedRendererState);
95 }; 96 };
96 97
97 class InsideHardwareReleaseReset { 98 class InsideHardwareReleaseReset {
98 public: 99 public:
99 explicit InsideHardwareReleaseReset( 100 explicit InsideHardwareReleaseReset(
100 SharedRendererState* shared_renderer_state); 101 SharedRendererState* shared_renderer_state);
101 ~InsideHardwareReleaseReset(); 102 ~InsideHardwareReleaseReset();
102 103
103 private: 104 private:
104 SharedRendererState* shared_renderer_state_; 105 SharedRendererState* shared_renderer_state_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(InsideHardwareReleaseReset); 107 DISALLOW_COPY_AND_ASSIGN(InsideHardwareReleaseReset);
107 }; 108 };
108 109
109 } // namespace android_webview 110 } // namespace android_webview
110 111
111 #endif // ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ 112 #endif // ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_
OLDNEW
« no previous file with comments | « android_webview/browser/net/android_stream_reader_url_request_job.h ('k') | android_webview/browser/shared_renderer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698