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

Side by Side Diff: chrome/renderer/automation/automation_renderer_helper.cc

Issue 11418217: Add skia::RefPtr class to wrap ref counted classes from Skia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit+rebase Created 8 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/chrome_tests_unit.gypi ('k') | chrome/renderer/print_web_view_helper_linux.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 #include "chrome/renderer/automation/automation_renderer_helper.h" 5 #include "chrome/renderer/automation/automation_renderer_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 frame->setCanHaveScrollbars(false); 63 frame->setCanHaveScrollbars(false);
64 view->setFixedLayoutSize(old_size); 64 view->setFixedLayoutSize(old_size);
65 view->enableFixedLayoutMode(true); 65 view->enableFixedLayoutMode(true);
66 view->resize(new_size); 66 view->resize(new_size);
67 view->layout(); 67 view->layout();
68 frame->setScrollOffset(WebSize(0, 0)); 68 frame->setScrollOffset(WebSize(0, 0));
69 69
70 skia::ScopedPlatformCanvas canvas(new_size.width, new_size.height, true); 70 skia::ScopedPlatformCanvas canvas(new_size.width, new_size.height, true);
71 71
72 view->paint(webkit_glue::ToWebCanvas(canvas), 72 view->paint(webkit_glue::ToWebCanvas(canvas.get()),
73 gfx::Rect(0, 0, new_size.width, new_size.height)); 73 gfx::Rect(0, 0, new_size.width, new_size.height));
74 74
75 frame->setCanHaveScrollbars(true); 75 frame->setCanHaveScrollbars(true);
76 view->setFixedLayoutSize(fixed_size); 76 view->setFixedLayoutSize(fixed_size);
77 view->enableFixedLayoutMode(fixed_layout_enabled); 77 view->enableFixedLayoutMode(fixed_layout_enabled);
78 view->resize(old_size); 78 view->resize(old_size);
79 view->layout(); 79 view->layout();
80 frame->setScrollOffset(WebSize(old_scroll.width - min_scroll.width, 80 frame->setScrollOffset(WebSize(old_scroll.width - min_scroll.width,
81 old_scroll.height - min_scroll.height)); 81 old_scroll.height - min_scroll.height));
82 82
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 routing_id(), frame->identifier())); 281 routing_id(), frame->identifier()));
282 } 282 }
283 283
284 void AutomationRendererHelper::OnProcessMouseEvent( 284 void AutomationRendererHelper::OnProcessMouseEvent(
285 const AutomationMouseEvent& event) { 285 const AutomationMouseEvent& event) {
286 std::string error_msg; 286 std::string error_msg;
287 bool success = ProcessMouseEvent(event, &error_msg); 287 bool success = ProcessMouseEvent(event, &error_msg);
288 Send(new AutomationMsg_ProcessMouseEventACK( 288 Send(new AutomationMsg_ProcessMouseEventACK(
289 routing_id(), success, error_msg)); 289 routing_id(), success, error_msg));
290 } 290 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/renderer/print_web_view_helper_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698