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

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

Issue 14110: Move the "platform" wrappers in skia/ext to the skia namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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_view.cc ('k') | chrome/renderer/webplugin_delegate_proxy.h » ('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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 void RenderWidget::ClearFocus() { 351 void RenderWidget::ClearFocus() {
352 // We may have got the focus from the browser before this gets processed, in 352 // We may have got the focus from the browser before this gets processed, in
353 // which case we do not want to unfocus ourself. 353 // which case we do not want to unfocus ourself.
354 if (!has_focus_ && webwidget_) 354 if (!has_focus_ && webwidget_)
355 webwidget_->SetFocus(false); 355 webwidget_->SetFocus(false);
356 } 356 }
357 357
358 void RenderWidget::PaintRect(const gfx::Rect& rect, 358 void RenderWidget::PaintRect(const gfx::Rect& rect,
359 base::SharedMemory* paint_buf) { 359 base::SharedMemory* paint_buf) {
360 gfx::PlatformCanvasWin canvas(rect.width(), rect.height(), true, 360 skia::PlatformCanvasWin canvas(rect.width(), rect.height(), true,
361 paint_buf->handle()); 361 paint_buf->handle());
362 // Bring the canvas into the coordinate system of the paint rect 362 // Bring the canvas into the coordinate system of the paint rect
363 canvas.translate(static_cast<SkScalar>(-rect.x()), 363 canvas.translate(static_cast<SkScalar>(-rect.x()),
364 static_cast<SkScalar>(-rect.y())); 364 static_cast<SkScalar>(-rect.y()));
365 365
366 webwidget_->Paint(&canvas, rect); 366 webwidget_->Paint(&canvas, rect);
367 367
368 // Flush to underlying bitmap. TODO(darin): is this needed? 368 // Flush to underlying bitmap. TODO(darin): is this needed?
369 canvas.getTopPlatformDevice().accessBitmap(false); 369 canvas.getTopPlatformDevice().accessBitmap(false);
370 370
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 for (; i < plugin_window_moves_.size(); ++i) { 770 for (; i < plugin_window_moves_.size(); ++i) {
771 if (plugin_window_moves_[i].window == move.window) { 771 if (plugin_window_moves_[i].window == move.window) {
772 plugin_window_moves_[i] = move; 772 plugin_window_moves_[i] = move;
773 break; 773 break;
774 } 774 }
775 } 775 }
776 776
777 if (i == plugin_window_moves_.size()) 777 if (i == plugin_window_moves_.size())
778 plugin_window_moves_.push_back(move); 778 plugin_window_moves_.push_back(move);
779 } 779 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/renderer/webplugin_delegate_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698