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

Side by Side Diff: content/renderer/render_widget.h

Issue 9517010: Change panels to be able to turn off autoresize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix assert at the end of RenderWidget::Resize which fixes the tests on OSX. Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <vector> 10 #include <vector>
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 return filtered_time_per_frame_; 151 return filtered_time_per_frame_;
152 } 152 }
153 153
154 protected: 154 protected:
155 // Friend RefCounted so that the dtor can be non-public. Using this class 155 // Friend RefCounted so that the dtor can be non-public. Using this class
156 // without ref-counting is an error. 156 // without ref-counting is an error.
157 friend class base::RefCounted<RenderWidget>; 157 friend class base::RefCounted<RenderWidget>;
158 // For unit tests. 158 // For unit tests.
159 friend class RenderWidgetTest; 159 friend class RenderWidgetTest;
160 160
161 enum ResizeAck {
162 SEND_RESIZE_ACK,
163 NO_RESIZE_ACK,
164 };
165
161 RenderWidget(WebKit::WebPopupType popup_type, 166 RenderWidget(WebKit::WebPopupType popup_type,
162 const WebKit::WebScreenInfo& screen_info); 167 const WebKit::WebScreenInfo& screen_info);
163 virtual ~RenderWidget(); 168 virtual ~RenderWidget();
164 169
165 // Initializes this view with the given opener. CompleteInit must be called 170 // Initializes this view with the given opener. CompleteInit must be called
166 // later. 171 // later.
167 void Init(int32 opener_id); 172 void Init(int32 opener_id);
168 173
169 // Called by Init and subclasses to perform initialization. 174 // Called by Init and subclasses to perform initialization.
170 void DoInit(int32 opener_id, 175 void DoInit(int32 opener_id,
(...skipping 25 matching lines...) Expand all
196 void DoDeferredUpdateAndSendInputAck(); 201 void DoDeferredUpdateAndSendInputAck();
197 void DoDeferredUpdate(); 202 void DoDeferredUpdate();
198 void DoDeferredClose(); 203 void DoDeferredClose();
199 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); 204 void DoDeferredSetWindowRect(const WebKit::WebRect& pos);
200 205
201 // Set the background of the render widget to a bitmap. The bitmap will be 206 // Set the background of the render widget to a bitmap. The bitmap will be
202 // tiled in both directions if it isn't big enough to fill the area. This is 207 // tiled in both directions if it isn't big enough to fill the area. This is
203 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). 208 // mainly intended to be used in conjuction with WebView::SetIsTransparent().
204 virtual void SetBackground(const SkBitmap& bitmap); 209 virtual void SetBackground(const SkBitmap& bitmap);
205 210
211 // Resizes the render widget.
212 void Resize(const gfx::Size& new_size,
213 const gfx::Rect& resizer_rect,
214 bool is_fullscreen,
215 ResizeAck resize_ack);
216
206 // RenderWidget IPC message handlers 217 // RenderWidget IPC message handlers
207 void OnClose(); 218 void OnClose();
208 void OnCreatingNewAck(gfx::NativeViewId parent); 219 void OnCreatingNewAck(gfx::NativeViewId parent);
209 virtual void OnResize(const gfx::Size& new_size, 220 virtual void OnResize(const gfx::Size& new_size,
210 const gfx::Rect& resizer_rect, 221 const gfx::Rect& resizer_rect,
211 bool is_fullscreen); 222 bool is_fullscreen);
212 void OnChangeResizeRect(const gfx::Rect& resizer_rect); 223 void OnChangeResizeRect(const gfx::Rect& resizer_rect);
213 virtual void OnWasHidden(); 224 virtual void OnWasHidden();
214 virtual void OnWasRestored(bool needs_repainting); 225 virtual void OnWasRestored(bool needs_repainting);
215 virtual void OnWasSwappedOut(); 226 virtual void OnWasSwappedOut();
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 // Set to true if we should invert all pixels. 515 // Set to true if we should invert all pixels.
505 bool invert_; 516 bool invert_;
506 517
507 // The Skia paint object for inverting. 518 // The Skia paint object for inverting.
508 scoped_ptr<SkPaint> invert_paint_; 519 scoped_ptr<SkPaint> invert_paint_;
509 520
510 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 521 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
511 }; 522 };
512 523
513 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 524 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698