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

Side by Side Diff: ui/views/cocoa/bridged_content_view.mm

Issue 283053002: Add compositing, layers to app_list_demo Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto master -- probably slightly broken Created 6 years, 3 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
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/cocoa/bridged_native_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "ui/views/cocoa/bridged_content_view.h" 5 #import "ui/views/cocoa/bridged_content_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "ui/base/ime/text_input_client.h" 10 #include "ui/base/ime/text_input_client.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 - (void)setFrameSize:(NSSize)newSize { 83 - (void)setFrameSize:(NSSize)newSize {
84 [super setFrameSize:newSize]; 84 [super setFrameSize:newSize];
85 if (!hostedView_) 85 if (!hostedView_)
86 return; 86 return;
87 87
88 hostedView_->SetSize(gfx::Size(newSize.width, newSize.height)); 88 hostedView_->SetSize(gfx::Size(newSize.width, newSize.height));
89 } 89 }
90 90
91 - (void)drawRect:(NSRect)dirtyRect { 91 - (void)drawRect:(NSRect)dirtyRect {
92 if (!hostedView_) 92 if (!hostedView_ || [self wantsLayer])
93 return; 93 return;
94 94
95 gfx::CanvasSkiaPaint canvas(dirtyRect, false /* opaque */); 95 gfx::CanvasSkiaPaint canvas(dirtyRect, false /* opaque */);
96 hostedView_->Paint(&canvas, views::CullSet()); 96 hostedView_->Paint(&canvas, views::CullSet());
97 } 97 }
98 98
99 // NSResponder implementation. 99 // NSResponder implementation.
100 100
101 - (void)keyDown:(NSEvent*)theEvent { 101 - (void)keyDown:(NSEvent*)theEvent {
102 if (textInputClient_) 102 if (textInputClient_)
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 312
313 return [super accessibilityAttributeValue:attribute]; 313 return [super accessibilityAttributeValue:attribute];
314 } 314 }
315 315
316 - (id)accessibilityHitTest:(NSPoint)point { 316 - (id)accessibilityHitTest:(NSPoint)point {
317 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; 317 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point];
318 } 318 }
319 319
320 @end 320 @end
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/cocoa/bridged_native_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698