Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 // If there is a Send call on the stack, then it could be dangerous to close | 253 // If there is a Send call on the stack, then it could be dangerous to close |
| 254 // now. Post a task that only gets invoked when there are no nested message | 254 // now. Post a task that only gets invoked when there are no nested message |
| 255 // loops. | 255 // loops. |
| 256 MessageLoop::current()->PostNonNestableTask( | 256 MessageLoop::current()->PostNonNestableTask( |
| 257 FROM_HERE, NewRunnableMethod(this, &RenderWidget::Close)); | 257 FROM_HERE, NewRunnableMethod(this, &RenderWidget::Close)); |
| 258 | 258 |
| 259 // Balances the AddRef taken when we called AddRoute. | 259 // Balances the AddRef taken when we called AddRoute. |
| 260 Release(); | 260 Release(); |
| 261 } | 261 } |
| 262 | 262 |
| 263 void RenderWidget::setSize(const WebSize& new_size) { | |
| 264 size_ = new_size; | |
|
darin (slow to review)
2011/11/30 23:31:00
following this call, we should expect to get inval
levin
2011/12/01 20:18:06
Yes.
| |
| 265 } | |
| 266 | |
| 263 void RenderWidget::OnResize(const gfx::Size& new_size, | 267 void RenderWidget::OnResize(const gfx::Size& new_size, |
| 264 const gfx::Rect& resizer_rect, | 268 const gfx::Rect& resizer_rect, |
| 265 bool is_fullscreen) { | 269 bool is_fullscreen) { |
| 266 // During shutdown we can just ignore this message. | 270 // During shutdown we can just ignore this message. |
| 267 if (!webwidget_) | 271 if (!webwidget_) |
| 268 return; | 272 return; |
| 269 | 273 |
| 270 // We shouldn't be asked to resize to our current size. | 274 // We shouldn't be asked to resize to our current size. |
| 271 DCHECK(size_ != new_size || resizer_rect_ != resizer_rect); | 275 DCHECK(size_ != new_size || resizer_rect_ != resizer_rect); |
| 272 | 276 |
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1499 } | 1503 } |
| 1500 } | 1504 } |
| 1501 | 1505 |
| 1502 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1506 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
| 1503 return false; | 1507 return false; |
| 1504 } | 1508 } |
| 1505 | 1509 |
| 1506 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1510 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
| 1507 return false; | 1511 return false; |
| 1508 } | 1512 } |
| OLD | NEW |