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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.h

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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 CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
7 7
8 #include <stddef.h>
9 #include <stdint.h>
10
8 #include <vector> 11 #include <vector>
9 12
13 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "build/build_config.h"
11 #include "cc/resources/returned_resource.h" 16 #include "cc/resources/returned_resource.h"
12 #include "cc/surfaces/surface_factory_client.h" 17 #include "cc/surfaces/surface_factory_client.h"
13 #include "cc/surfaces/surface_id_allocator.h" 18 #include "cc/surfaces/surface_id_allocator.h"
14 #include "content/browser/compositor/image_transport_factory.h" 19 #include "content/browser/compositor/image_transport_factory.h"
15 #include "content/browser/renderer_host/render_widget_host_view_base.h" 20 #include "content/browser/renderer_host/render_widget_host_view_base.h"
16 #include "content/common/content_export.h" 21 #include "content/common/content_export.h"
17 #include "content/public/browser/readback_types.h" 22 #include "content/public/browser/readback_types.h"
18 #include "ui/compositor/compositor.h" 23 #include "ui/compositor/compositor.h"
19 #include "ui/gfx/geometry/rect.h" 24 #include "ui/gfx/geometry/rect.h"
20 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const gfx::Rect& src_subrect, 103 const gfx::Rect& src_subrect,
99 const gfx::Size& dst_size, 104 const gfx::Size& dst_size,
100 const ReadbackRequestCallback& callback, 105 const ReadbackRequestCallback& callback,
101 const SkColorType preferred_color_type) override; 106 const SkColorType preferred_color_type) override;
102 void CopyFromCompositingSurfaceToVideoFrame( 107 void CopyFromCompositingSurfaceToVideoFrame(
103 const gfx::Rect& src_subrect, 108 const gfx::Rect& src_subrect,
104 const scoped_refptr<media::VideoFrame>& target, 109 const scoped_refptr<media::VideoFrame>& target,
105 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; 110 const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
106 bool CanCopyToVideoFrame() const override; 111 bool CanCopyToVideoFrame() const override;
107 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; 112 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
108 void OnSwapCompositorFrame(uint32 output_surface_id, 113 void OnSwapCompositorFrame(uint32_t output_surface_id,
109 scoped_ptr<cc::CompositorFrame> frame) override; 114 scoped_ptr<cc::CompositorFrame> frame) override;
110 // Since the URL of content rendered by this class is not displayed in 115 // Since the URL of content rendered by this class is not displayed in
111 // the URL bar, this method does not need an implementation. 116 // the URL bar, this method does not need an implementation.
112 void ClearCompositorFrame() override {} 117 void ClearCompositorFrame() override {}
113 void GetScreenInfo(blink::WebScreenInfo* results) override; 118 void GetScreenInfo(blink::WebScreenInfo* results) override;
114 bool GetScreenColorProfile(std::vector<char>* color_profile) override; 119 bool GetScreenColorProfile(std::vector<char>* color_profile) override;
115 gfx::Rect GetBoundsInRootWindow() override; 120 gfx::Rect GetBoundsInRootWindow() override;
116 #if defined(USE_AURA) 121 #if defined(USE_AURA)
117 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, 122 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
118 InputEventAckState ack_result) override; 123 InputEventAckState ack_result) override;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( 159 BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
155 BrowserAccessibilityDelegate* delegate) override; 160 BrowserAccessibilityDelegate* delegate) override;
156 161
157 // cc::SurfaceFactoryClient implementation. 162 // cc::SurfaceFactoryClient implementation.
158 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 163 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
159 void SetBeginFrameSource(cc::SurfaceId surface_id, 164 void SetBeginFrameSource(cc::SurfaceId surface_id,
160 cc::BeginFrameSource* begin_frame_source) override; 165 cc::BeginFrameSource* begin_frame_source) override;
161 166
162 // Declared 'public' instead of 'protected' here to allow derived classes 167 // Declared 'public' instead of 'protected' here to allow derived classes
163 // to Bind() to it. 168 // to Bind() to it.
164 void SurfaceDrawn(uint32 output_surface_id, cc::SurfaceDrawStatus drawn); 169 void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn);
165 170
166 protected: 171 protected:
167 friend class RenderWidgetHostView; 172 friend class RenderWidgetHostView;
168 friend class RenderWidgetHostViewChildFrameTest; 173 friend class RenderWidgetHostViewChildFrameTest;
169 friend class RenderWidgetHostViewGuestSurfaceTest; 174 friend class RenderWidgetHostViewGuestSurfaceTest;
170 175
171 // Clears current compositor surface, if one is in use. 176 // Clears current compositor surface, if one is in use.
172 void ClearCompositorSurfaceIfNecessary(); 177 void ClearCompositorSurfaceIfNecessary();
173 178
174 // The last scroll offset of the view. 179 // The last scroll offset of the view.
175 gfx::Vector2dF last_scroll_offset_; 180 gfx::Vector2dF last_scroll_offset_;
176 181
177 // Members will become private when RenderWidgetHostViewGuest is removed. 182 // Members will become private when RenderWidgetHostViewGuest is removed.
178 // The model object. 183 // The model object.
179 RenderWidgetHostImpl* host_; 184 RenderWidgetHostImpl* host_;
180 185
181 // Flag determining whether we render into a compositing Surface. 186 // Flag determining whether we render into a compositing Surface.
182 bool use_surfaces_; 187 bool use_surfaces_;
183 188
184 // Surface-related state. 189 // Surface-related state.
185 scoped_ptr<cc::SurfaceIdAllocator> id_allocator_; 190 scoped_ptr<cc::SurfaceIdAllocator> id_allocator_;
186 scoped_ptr<cc::SurfaceFactory> surface_factory_; 191 scoped_ptr<cc::SurfaceFactory> surface_factory_;
187 cc::SurfaceId surface_id_; 192 cc::SurfaceId surface_id_;
188 uint32 next_surface_sequence_; 193 uint32_t next_surface_sequence_;
189 uint32 last_output_surface_id_; 194 uint32_t last_output_surface_id_;
190 gfx::Size current_surface_size_; 195 gfx::Size current_surface_size_;
191 float current_surface_scale_factor_; 196 float current_surface_scale_factor_;
192 uint32 ack_pending_count_; 197 uint32_t ack_pending_count_;
193 cc::ReturnedResourceArray surface_returned_resources_; 198 cc::ReturnedResourceArray surface_returned_resources_;
194 199
195 // frame_connector_ provides a platform abstraction. Messages 200 // frame_connector_ provides a platform abstraction. Messages
196 // sent through it are routed to the embedding renderer process. 201 // sent through it are routed to the embedding renderer process.
197 CrossProcessFrameConnector* frame_connector_; 202 CrossProcessFrameConnector* frame_connector_;
198 203
199 base::WeakPtr<RenderWidgetHostViewChildFrame> AsWeakPtr() { 204 base::WeakPtr<RenderWidgetHostViewChildFrame> AsWeakPtr() {
200 return weak_factory_.GetWeakPtr(); 205 return weak_factory_.GetWeakPtr();
201 } 206 }
202 207
203 private: 208 private:
204 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; 209 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_;
205 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); 210 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame);
206 }; 211 };
207 212
208 } // namespace content 213 } // namespace content
209 214
210 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ 215 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698