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

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

Issue 10349013: Prevent browser thumbnailer from trying to read from frontbuffer (surface texture) when none exists. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK protection against segfault. Created 8 years, 7 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
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 "content/browser/renderer_host/render_widget_host_view_gtk.h" 5 #include "content/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 net::URLRequestStatus::Status. 9 // badly with net::URLRequestStatus::Status.
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 void RenderWidgetHostViewGtk::Blur() { 751 void RenderWidgetHostViewGtk::Blur() {
752 // TODO(estade): We should be clearing native focus as well, but I know of no 752 // TODO(estade): We should be clearing native focus as well, but I know of no
753 // way to do that without focusing another widget. 753 // way to do that without focusing another widget.
754 host_->Blur(); 754 host_->Blur();
755 } 755 }
756 756
757 bool RenderWidgetHostViewGtk::HasFocus() const { 757 bool RenderWidgetHostViewGtk::HasFocus() const {
758 return gtk_widget_is_focus(view_.get()); 758 return gtk_widget_is_focus(view_.get());
759 } 759 }
760 760
761 bool RenderWidgetHostViewGtk::IsSurfaceAvailableForCopy() const {
762 return !!host_->GetBackingStore(false);
763 }
764
761 void RenderWidgetHostViewGtk::Show() { 765 void RenderWidgetHostViewGtk::Show() {
762 gtk_widget_show(view_.get()); 766 gtk_widget_show(view_.get());
763 } 767 }
764 768
765 void RenderWidgetHostViewGtk::Hide() { 769 void RenderWidgetHostViewGtk::Hide() {
766 gtk_widget_hide(view_.get()); 770 gtk_widget_hide(view_.get());
767 } 771 }
768 772
769 bool RenderWidgetHostViewGtk::IsShowing() { 773 bool RenderWidgetHostViewGtk::IsShowing() {
770 return gtk_widget_get_visible(view_.get()); 774 return gtk_widget_get_visible(view_.get());
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 browser_accessibility_manager_.reset( 1488 browser_accessibility_manager_.reset(
1485 BrowserAccessibilityManager::CreateEmptyDocument( 1489 BrowserAccessibilityManager::CreateEmptyDocument(
1486 parent, static_cast<WebAccessibility::State>(0), this)); 1490 parent, static_cast<WebAccessibility::State>(0), this));
1487 } 1491 }
1488 BrowserAccessibilityGtk* root = 1492 BrowserAccessibilityGtk* root =
1489 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); 1493 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk();
1490 1494
1491 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); 1495 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER);
1492 return root->GetAtkObject(); 1496 return root->GetAtkObject();
1493 } 1497 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698