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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

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_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 514
515 void RenderWidgetHostViewMac::Blur() { 515 void RenderWidgetHostViewMac::Blur() {
516 UnlockMouse(); 516 UnlockMouse();
517 [[cocoa_view_ window] makeFirstResponder:nil]; 517 [[cocoa_view_ window] makeFirstResponder:nil];
518 } 518 }
519 519
520 bool RenderWidgetHostViewMac::HasFocus() const { 520 bool RenderWidgetHostViewMac::HasFocus() const {
521 return [[cocoa_view_ window] firstResponder] == cocoa_view_; 521 return [[cocoa_view_ window] firstResponder] == cocoa_view_;
522 } 522 }
523 523
524 bool RenderWidgetHostViewMac::IsSurfaceAvailableForCopy() const {
525 return !!render_widget_host_->GetBackingStore(false) ||
526 (compositing_iosurface_.get() && compositing_iosurface_->HasIOSurface());
527 }
528
524 void RenderWidgetHostViewMac::Show() { 529 void RenderWidgetHostViewMac::Show() {
525 [cocoa_view_ setHidden:NO]; 530 [cocoa_view_ setHidden:NO];
526 531
527 DidBecomeSelected(); 532 DidBecomeSelected();
528 } 533 }
529 534
530 void RenderWidgetHostViewMac::Hide() { 535 void RenderWidgetHostViewMac::Hide() {
531 [cocoa_view_ setHidden:YES]; 536 [cocoa_view_ setHidden:YES];
532 537
533 WasHidden(); 538 WasHidden();
(...skipping 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after
2928 if (!string) return NO; 2933 if (!string) return NO;
2929 2934
2930 // If the user is currently using an IME, confirm the IME input, 2935 // If the user is currently using an IME, confirm the IME input,
2931 // and then insert the text from the service, the same as TextEdit and Safari. 2936 // and then insert the text from the service, the same as TextEdit and Safari.
2932 [self confirmComposition]; 2937 [self confirmComposition];
2933 [self insertText:string]; 2938 [self insertText:string];
2934 return YES; 2939 return YES;
2935 } 2940 }
2936 2941
2937 @end 2942 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698