| OLD | NEW |
| 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 is_showing_context_menu_ = showing; | 533 is_showing_context_menu_ = showing; |
| 534 } | 534 } |
| 535 | 535 |
| 536 BackingStore* RenderWidgetHostViewGtk::AllocBackingStore( | 536 BackingStore* RenderWidgetHostViewGtk::AllocBackingStore( |
| 537 const gfx::Size& size) { | 537 const gfx::Size& size) { |
| 538 return new BackingStore(host_, size, | 538 return new BackingStore(host_, size, |
| 539 x11_util::GetVisualFromGtkWidget(view_.get()), | 539 x11_util::GetVisualFromGtkWidget(view_.get()), |
| 540 gtk_widget_get_visual(view_.get())->depth); | 540 gtk_widget_get_visual(view_.get())->depth); |
| 541 } | 541 } |
| 542 | 542 |
| 543 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) { |
| 544 RenderWidgetHostView::SetBackground(background); |
| 545 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background)); |
| 546 } |
| 547 |
| 543 void RenderWidgetHostViewGtk::Paint(const gfx::Rect& damage_rect) { | 548 void RenderWidgetHostViewGtk::Paint(const gfx::Rect& damage_rect) { |
| 544 DCHECK(!about_to_validate_and_paint_); | 549 DCHECK(!about_to_validate_and_paint_); |
| 545 | 550 |
| 546 invalid_rect_ = damage_rect; | 551 invalid_rect_ = damage_rect; |
| 547 about_to_validate_and_paint_ = true; | 552 about_to_validate_and_paint_ = true; |
| 548 BackingStore* backing_store = host_->GetBackingStore(true); | 553 BackingStore* backing_store = host_->GetBackingStore(true); |
| 549 // Calling GetBackingStore maybe have changed |invalid_rect_|... | 554 // Calling GetBackingStore maybe have changed |invalid_rect_|... |
| 550 about_to_validate_and_paint_ = false; | 555 about_to_validate_and_paint_ = false; |
| 551 | 556 |
| 552 gfx::Rect paint_rect = gfx::Rect(0, 0, kMaxWindowWidth, kMaxWindowHeight); | 557 gfx::Rect paint_rect = gfx::Rect(0, 0, kMaxWindowWidth, kMaxWindowHeight); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 627 |
| 623 void RenderWidgetHostViewGtk::CreatePluginContainer( | 628 void RenderWidgetHostViewGtk::CreatePluginContainer( |
| 624 gfx::PluginWindowHandle id) { | 629 gfx::PluginWindowHandle id) { |
| 625 plugin_container_manager_.CreatePluginContainer(id); | 630 plugin_container_manager_.CreatePluginContainer(id); |
| 626 } | 631 } |
| 627 | 632 |
| 628 void RenderWidgetHostViewGtk::DestroyPluginContainer( | 633 void RenderWidgetHostViewGtk::DestroyPluginContainer( |
| 629 gfx::PluginWindowHandle id) { | 634 gfx::PluginWindowHandle id) { |
| 630 plugin_container_manager_.DestroyPluginContainer(id); | 635 plugin_container_manager_.DestroyPluginContainer(id); |
| 631 } | 636 } |
| OLD | NEW |