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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 506013: Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
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/browser/renderer_host/render_widget_host_view_gtk.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h"
6 6
7 // If this gets included after the gtk headers, then a bunch of compiler 7 // If this gets included after the gtk headers, then a bunch of compiler
8 // errors happen because of a "#define Status int" in Xlib.h, which interacts 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts
9 // badly with URLRequestStatus::Status. 9 // badly with URLRequestStatus::Status.
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 if (current_cursor_.GetCursorType() == GDK_LAST_CURSOR) 498 if (current_cursor_.GetCursorType() == GDK_LAST_CURSOR)
499 ShowCurrentCursor(); 499 ShowCurrentCursor();
500 } 500 }
501 501
502 void RenderWidgetHostViewGtk::IMEUpdateStatus(int control, 502 void RenderWidgetHostViewGtk::IMEUpdateStatus(int control,
503 const gfx::Rect& caret_rect) { 503 const gfx::Rect& caret_rect) {
504 im_context_->UpdateStatus(control, caret_rect); 504 im_context_->UpdateStatus(control, caret_rect);
505 key_bindings_handler_->set_enabled(control != IME_DISABLE); 505 key_bindings_handler_->set_enabled(control != IME_DISABLE);
506 } 506 }
507 507
508 void RenderWidgetHostViewGtk::DidPaintRect(const gfx::Rect& rect) { 508 void RenderWidgetHostViewGtk::DidPaintBackingStoreRects(
509 const std::vector<gfx::Rect>& rects) {
509 if (is_hidden_) 510 if (is_hidden_)
510 return; 511 return;
511 512
512 if (about_to_validate_and_paint_) 513 for (size_t i = 0; i < rects.size(); ++i) {
513 invalid_rect_ = invalid_rect_.Union(rect); 514 if (about_to_validate_and_paint_) {
514 else 515 invalid_rect_ = invalid_rect_.Union(rects[i]);
515 Paint(rect); 516 } else {
517 Paint(rects[i]);
518 }
519 }
516 } 520 }
517 521
518 void RenderWidgetHostViewGtk::DidScrollRect(const gfx::Rect& rect, int dx, 522 void RenderWidgetHostViewGtk::DidScrollBackingStoreRect(const gfx::Rect& rect,
519 int dy) { 523 int dx, int dy) {
520 if (is_hidden_) 524 if (is_hidden_)
521 return; 525 return;
522 526
527 // TODO(darin): Implement the equivalent of Win32's ScrollWindowEX. Can that
528 // be done using XCopyArea? Perhaps similar to BackingStore::ScrollRect?
523 Paint(rect); 529 Paint(rect);
524 } 530 }
525 531
526 void RenderWidgetHostViewGtk::RenderViewGone() { 532 void RenderWidgetHostViewGtk::RenderViewGone() {
527 Destroy(); 533 Destroy();
528 plugin_container_manager_.set_host_widget(NULL); 534 plugin_container_manager_.set_host_widget(NULL);
529 } 535 }
530 536
531 void RenderWidgetHostViewGtk::Destroy() { 537 void RenderWidgetHostViewGtk::Destroy() {
532 // If |parent_| is non-null, we are a popup and we must disconnect from our 538 // If |parent_| is non-null, we are a popup and we must disconnect from our
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 const NativeWebKeyboardEvent& event) { 693 const NativeWebKeyboardEvent& event) {
688 if (!host_) 694 if (!host_)
689 return; 695 return;
690 696
691 EditCommands edit_commands; 697 EditCommands edit_commands;
692 if (key_bindings_handler_->Match(event, &edit_commands)) { 698 if (key_bindings_handler_->Match(event, &edit_commands)) {
693 host_->ForwardEditCommandsForNextKeyEvent(edit_commands); 699 host_->ForwardEditCommandsForNextKeyEvent(edit_commands);
694 } 700 }
695 host_->ForwardKeyboardEvent(event); 701 host_->ForwardKeyboardEvent(event);
696 } 702 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_gtk.h ('k') | chrome/browser/renderer_host/render_widget_host_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698