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

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

Issue 4319003: Replace TabContentsViewGtk with TabContentsViewViews as part of the ongoing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address final comments from reviewers Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 paint_rect = paint_rect.Intersect(invalid_rect_); 830 paint_rect = paint_rect.Intersect(invalid_rect_);
831 831
832 if (backing_store) { 832 if (backing_store) {
833 // Only render the widget if it is attached to a window; there's a short 833 // Only render the widget if it is attached to a window; there's a short
834 // period where this object isn't attached to a window but hasn't been 834 // period where this object isn't attached to a window but hasn't been
835 // Destroy()ed yet and it receives paint messages... 835 // Destroy()ed yet and it receives paint messages...
836 if (window) { 836 if (window) {
837 if (!visually_deemphasized_) { 837 if (!visually_deemphasized_) {
838 // In the common case, use XCopyArea. We don't draw more than once, so 838 // In the common case, use XCopyArea. We don't draw more than once, so
839 // we don't need to double buffer. 839 // we don't need to double buffer.
840 backing_store->XShowRect( 840 backing_store->XShowRect(gfx::Point(0, 0),
841 paint_rect, x11_util::GetX11WindowFromGtkWidget(view_.get())); 841 paint_rect, x11_util::GetX11WindowFromGtkWidget(view_.get()));
842 } else { 842 } else {
843 // If the grey blend is showing, we make two drawing calls. Use double 843 // If the grey blend is showing, we make two drawing calls. Use double
844 // buffering to prevent flicker. Use CairoShowRect because XShowRect 844 // buffering to prevent flicker. Use CairoShowRect because XShowRect
845 // shortcuts GDK's double buffering. We won't be able to draw outside 845 // shortcuts GDK's double buffering. We won't be able to draw outside
846 // of |damage_rect|, so invalidate the difference between |paint_rect| 846 // of |damage_rect|, so invalidate the difference between |paint_rect|
847 // and |damage_rect|. 847 // and |damage_rect|.
848 if (paint_rect != damage_rect) { 848 if (paint_rect != damage_rect) {
849 GdkRectangle extra_gdk_rect = 849 GdkRectangle extra_gdk_rect =
850 paint_rect.Subtract(damage_rect).ToGdkRectangle(); 850 paint_rect.Subtract(damage_rect).ToGdkRectangle();
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 } 1063 }
1064 1064
1065 // static 1065 // static
1066 RenderWidgetHostView* 1066 RenderWidgetHostView*
1067 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 1067 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
1068 gfx::NativeView widget) { 1068 gfx::NativeView widget) {
1069 gpointer user_data = g_object_get_data(G_OBJECT(widget), 1069 gpointer user_data = g_object_get_data(G_OBJECT(widget),
1070 kRenderWidgetHostViewKey); 1070 kRenderWidgetHostViewKey);
1071 return reinterpret_cast<RenderWidgetHostView*>(user_data); 1071 return reinterpret_cast<RenderWidgetHostView*>(user_data);
1072 } 1072 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/backing_store_x.cc ('k') | chrome/browser/renderer_host/render_widget_host_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698