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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Fixed an exo compile error 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 09d3d37d53c1d0784b864f1f20bdd7364ea9e411..dcc3404348e054ffa7b28c07a5a478da7246ad21 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -66,7 +66,7 @@ RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame(
}
RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() {
- if (!local_frame_id_.is_null())
+ if (local_frame_id_.is_valid())
surface_factory_->Destroy(local_frame_id_);
if (GetSurfaceManager())
@@ -85,7 +85,7 @@ void RenderWidgetHostViewChildFrame::SetCrossProcessFrameConnector(
return;
if (frame_connector_) {
- if (!parent_frame_sink_id_.is_null()) {
+ if (parent_frame_sink_id_.is_valid()) {
GetSurfaceManager()->UnregisterFrameSinkHierarchy(parent_frame_sink_id_,
frame_sink_id_);
}
@@ -109,7 +109,7 @@ void RenderWidgetHostViewChildFrame::SetCrossProcessFrameConnector(
frame_connector_->GetParentRenderWidgetHostView();
if (parent_view) {
parent_frame_sink_id_ = parent_view->GetFrameSinkId();
- DCHECK(!parent_frame_sink_id_.is_null());
+ DCHECK(parent_frame_sink_id_.is_valid());
GetSurfaceManager()->RegisterFrameSinkHierarchy(parent_frame_sink_id_,
frame_sink_id_);
}
@@ -148,7 +148,7 @@ bool RenderWidgetHostViewChildFrame::HasFocus() const {
}
bool RenderWidgetHostViewChildFrame::IsSurfaceAvailableForCopy() const {
- return surface_factory_ && !local_frame_id_.is_null();
+ return surface_factory_ && local_frame_id_.is_valid();
}
void RenderWidgetHostViewChildFrame::Show() {
@@ -404,7 +404,7 @@ void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame(
base::MakeUnique<cc::SurfaceFactory>(frame_sink_id_, manager, this);
}
- if (local_frame_id_.is_null()) {
+ if (!local_frame_id_.is_valid()) {
local_frame_id_ = id_allocator_->GenerateId();
surface_factory_->Create(local_frame_id_);
@@ -535,7 +535,7 @@ bool RenderWidgetHostViewChildFrame::TransformPointToLocalCoordSpace(
const cc::SurfaceId& original_surface,
gfx::Point* transformed_point) {
*transformed_point = point;
- if (!frame_connector_ || local_frame_id_.is_null())
+ if (!frame_connector_ || !local_frame_id_.is_valid())
return false;
return frame_connector_->TransformPointToLocalCoordSpace(
@@ -547,7 +547,7 @@ bool RenderWidgetHostViewChildFrame::TransformPointToCoordSpaceForView(
const gfx::Point& point,
RenderWidgetHostViewBase* target_view,
gfx::Point* transformed_point) {
- if (!frame_connector_ || local_frame_id_.is_null() || target_view == this)
+ if (!frame_connector_ || !local_frame_id_.is_valid() || target_view == this)
return false;
return frame_connector_->TransformPointToCoordSpaceForView(
@@ -730,7 +730,7 @@ RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager(
}
void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() {
- if (surface_factory_ && !local_frame_id_.is_null())
+ if (surface_factory_ && local_frame_id_.is_valid())
surface_factory_->Destroy(local_frame_id_);
local_frame_id_ = cc::LocalFrameId();
}

Powered by Google App Engine
This is Rietveld 408576698