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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 567923002: Refactoring the weak_ptr_factory order in content/browser/renderer_host (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 (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 #include "content/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid( 266 RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid(
267 RenderWidgetHostImpl* widget_host, 267 RenderWidgetHostImpl* widget_host,
268 ContentViewCoreImpl* content_view_core) 268 ContentViewCoreImpl* content_view_core)
269 : host_(widget_host), 269 : host_(widget_host),
270 outstanding_vsync_requests_(0), 270 outstanding_vsync_requests_(0),
271 is_showing_(!widget_host->is_hidden()), 271 is_showing_(!widget_host->is_hidden()),
272 content_view_core_(NULL), 272 content_view_core_(NULL),
273 ime_adapter_android_(this), 273 ime_adapter_android_(this),
274 cached_background_color_(SK_ColorWHITE), 274 cached_background_color_(SK_ColorWHITE),
275 last_output_surface_id_(kUndefinedOutputSurfaceId), 275 last_output_surface_id_(kUndefinedOutputSurfaceId),
276 weak_ptr_factory_(this),
277 overscroll_effect_enabled_( 276 overscroll_effect_enabled_(
278 !base::CommandLine::ForCurrentProcess()->HasSwitch( 277 !base::CommandLine::ForCurrentProcess()->HasSwitch(
279 switches::kDisableOverscrollEdgeEffect)), 278 switches::kDisableOverscrollEdgeEffect)),
280 gesture_provider_(CreateGestureProviderConfig(), this), 279 gesture_provider_(CreateGestureProviderConfig(), this),
281 gesture_text_selector_(this), 280 gesture_text_selector_(this),
282 touch_scrolling_(false), 281 touch_scrolling_(false),
283 potentially_active_fling_count_(0), 282 potentially_active_fling_count_(0),
284 accelerated_surface_route_id_(0), 283 accelerated_surface_route_id_(0),
285 using_synchronous_compositor_(SynchronousCompositorImpl::FromID( 284 using_synchronous_compositor_(SynchronousCompositorImpl::FromID(
286 widget_host->GetProcess()->GetID(), 285 widget_host->GetProcess()->GetID(),
287 widget_host->GetRoutingID()) != NULL), 286 widget_host->GetRoutingID()) != NULL),
288 frame_evictor_(new DelegatedFrameEvictor(this)), 287 frame_evictor_(new DelegatedFrameEvictor(this)),
289 locks_on_frame_count_(0), 288 locks_on_frame_count_(0),
290 observing_root_window_(false) { 289 observing_root_window_(false),
290 weak_ptr_factory_(this) {
291 host_->SetView(this); 291 host_->SetView(this);
292 SetContentViewCore(content_view_core); 292 SetContentViewCore(content_view_core);
293 ImageTransportFactoryAndroid::AddObserver(this); 293 ImageTransportFactoryAndroid::AddObserver(this);
294 } 294 }
295 295
296 RenderWidgetHostViewAndroid::~RenderWidgetHostViewAndroid() { 296 RenderWidgetHostViewAndroid::~RenderWidgetHostViewAndroid() {
297 ImageTransportFactoryAndroid::RemoveObserver(this); 297 ImageTransportFactoryAndroid::RemoveObserver(this);
298 SetContentViewCore(NULL); 298 SetContentViewCore(NULL);
299 DCHECK(ack_callbacks_.empty()); 299 DCHECK(ack_callbacks_.empty());
300 DCHECK(readbacks_waiting_for_frame_.empty()); 300 DCHECK(readbacks_waiting_for_frame_.empty());
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 results->orientationAngle = display.RotationAsDegree(); 1867 results->orientationAngle = display.RotationAsDegree();
1868 results->orientationType = 1868 results->orientationType =
1869 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1869 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1870 gfx::DeviceDisplayInfo info; 1870 gfx::DeviceDisplayInfo info;
1871 results->depth = info.GetBitsPerPixel(); 1871 results->depth = info.GetBitsPerPixel();
1872 results->depthPerComponent = info.GetBitsPerComponent(); 1872 results->depthPerComponent = info.GetBitsPerComponent();
1873 results->isMonochrome = (results->depthPerComponent == 0); 1873 results->isMonochrome = (results->depthPerComponent == 0);
1874 } 1874 }
1875 1875
1876 } // namespace content 1876 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698