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

Side by Side Diff: chrome/renderer/render_widget.cc

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_widget.h ('k') | chrome/renderer/renderer_glue.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/renderer/render_widget.h" 5 #include "chrome/renderer/render_widget.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/gfx/point.h" 9 #include "base/gfx/point.h"
10 #include "base/gfx/size.h" 10 #include "base/gfx/size.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 } 347 }
348 } 348 }
349 349
350 void RenderWidget::ClearFocus() { 350 void RenderWidget::ClearFocus() {
351 // We may have got the focus from the browser before this gets processed, in 351 // We may have got the focus from the browser before this gets processed, in
352 // which case we do not want to unfocus ourself. 352 // which case we do not want to unfocus ourself.
353 if (!has_focus_ && webwidget_) 353 if (!has_focus_ && webwidget_)
354 webwidget_->SetFocus(false); 354 webwidget_->SetFocus(false);
355 } 355 }
356 356
357 void RenderWidget::PaintRect(const gfx::Rect& rect, SharedMemory* paint_buf) { 357 void RenderWidget::PaintRect(const gfx::Rect& rect,
358 base::SharedMemory* paint_buf) {
358 gfx::PlatformCanvasWin canvas(rect.width(), rect.height(), true, 359 gfx::PlatformCanvasWin canvas(rect.width(), rect.height(), true,
359 paint_buf->handle()); 360 paint_buf->handle());
360 // Bring the canvas into the coordinate system of the paint rect 361 // Bring the canvas into the coordinate system of the paint rect
361 canvas.translate(static_cast<SkScalar>(-rect.x()), 362 canvas.translate(static_cast<SkScalar>(-rect.x()),
362 static_cast<SkScalar>(-rect.y())); 363 static_cast<SkScalar>(-rect.y()));
363 364
364 webwidget_->Paint(&canvas, rect); 365 webwidget_->Paint(&canvas, rect);
365 366
366 // Flush to underlying bitmap. TODO(darin): is this needed? 367 // Flush to underlying bitmap. TODO(darin): is this needed?
367 canvas.getTopPlatformDevice().accessBitmap(false); 368 canvas.getTopPlatformDevice().accessBitmap(false);
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 for (; i < plugin_window_moves_.size(); ++i) { 759 for (; i < plugin_window_moves_.size(); ++i) {
759 if (plugin_window_moves_[i].window == move.window) { 760 if (plugin_window_moves_[i].window == move.window) {
760 plugin_window_moves_[i] = move; 761 plugin_window_moves_[i] = move;
761 break; 762 break;
762 } 763 }
763 } 764 }
764 765
765 if (i == plugin_window_moves_.size()) 766 if (i == plugin_window_moves_.size())
766 plugin_window_moves_.push_back(move); 767 plugin_window_moves_.push_back(move);
767 } 768 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_widget.h ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698