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

Side by Side Diff: webkit/tools/test_shell/webwidget_host_gtk.cc

Issue 195067: Turn NULL used as int to 0.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « webkit/glue/webcursor_unittest.cc ('k') | no next file » | 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 "webkit/tools/test_shell/webwidget_host.h" 5 #include "webkit/tools/test_shell/webwidget_host.h"
6 6
7 #include <cairo/cairo.h> 7 #include <cairo/cairo.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 scroll_dx_(0), 312 scroll_dx_(0),
313 scroll_dy_(0) { 313 scroll_dy_(0) {
314 set_painting(false); 314 set_painting(false);
315 } 315 }
316 316
317 WebWidgetHost::~WebWidgetHost() { 317 WebWidgetHost::~WebWidgetHost() {
318 // We may be deleted before the view_. Clear out the signals so that we don't 318 // We may be deleted before the view_. Clear out the signals so that we don't
319 // attempt to invoke something on a deleted object. 319 // attempt to invoke something on a deleted object.
320 g_object_set_data(G_OBJECT(view_), kWebWidgetHostKey, NULL); 320 g_object_set_data(G_OBJECT(view_), kWebWidgetHostKey, NULL);
321 g_signal_handlers_disconnect_matched(view_, 321 g_signal_handlers_disconnect_matched(view_,
322 G_SIGNAL_MATCH_DATA, 0, NULL, NULL, NULL, this); 322 G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, this);
323 webwidget_->close(); 323 webwidget_->close();
324 } 324 }
325 325
326 void WebWidgetHost::Resize(const gfx::Size &newsize) { 326 void WebWidgetHost::Resize(const gfx::Size &newsize) {
327 // The pixel buffer backing us is now the wrong size 327 // The pixel buffer backing us is now the wrong size
328 canvas_.reset(); 328 canvas_.reset();
329 logical_size_ = newsize; 329 logical_size_ = newsize;
330 webwidget_->resize(newsize); 330 webwidget_->resize(newsize);
331 } 331 }
332 332
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 void WebWidgetHost::PaintRect(const gfx::Rect& rect) { 406 void WebWidgetHost::PaintRect(const gfx::Rect& rect) {
407 set_painting(true); 407 set_painting(true);
408 webwidget_->paint(canvas_.get(), rect); 408 webwidget_->paint(canvas_.get(), rect);
409 set_painting(false); 409 set_painting(false);
410 } 410 }
411 411
412 void WebWidgetHost::WindowDestroyed() { 412 void WebWidgetHost::WindowDestroyed() {
413 delete this; 413 delete this;
414 } 414 }
OLDNEW
« no previous file with comments | « webkit/glue/webcursor_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698