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

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

Issue 8498022: Have ExtensionHost use TabContents instead of RenderViewHost. Try #2. The first (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 } 1655 }
1656 1656
1657 - (void)setFrameSize:(NSSize)newSize { 1657 - (void)setFrameSize:(NSSize)newSize {
1658 // NB: -[NSView setFrame:] calls through -setFrameSize:, so overriding 1658 // NB: -[NSView setFrame:] calls through -setFrameSize:, so overriding
1659 // -setFrame: isn't neccessary. 1659 // -setFrame: isn't neccessary.
1660 [super setFrameSize:newSize]; 1660 [super setFrameSize:newSize];
1661 if (renderWidgetHostView_->render_widget_host_) 1661 if (renderWidgetHostView_->render_widget_host_)
1662 renderWidgetHostView_->render_widget_host_->WasResized(); 1662 renderWidgetHostView_->render_widget_host_->WasResized();
1663 } 1663 }
1664 1664
1665 - (void)setFrameWithDeferredUpdate:(NSRect)frameRect {
1666 [super setFrame:frameRect];
1667 [self performSelector:@selector(renderWidgetHostWasResized)
1668 withObject:nil
1669 afterDelay:0];
1670 }
1671
1672 - (void)renderWidgetHostWasResized {
1673 if (renderWidgetHostView_->render_widget_host_)
1674 renderWidgetHostView_->render_widget_host_->WasResized();
1675 }
1676
1677 - (void)callSetNeedsDisplayInRect { 1665 - (void)callSetNeedsDisplayInRect {
1678 DCHECK([NSThread isMainThread]); 1666 DCHECK([NSThread isMainThread]);
1679 DCHECK(renderWidgetHostView_->call_set_needs_display_in_rect_pending_); 1667 DCHECK(renderWidgetHostView_->call_set_needs_display_in_rect_pending_);
1680 [self setNeedsDisplayInRect:renderWidgetHostView_->invalid_rect_]; 1668 [self setNeedsDisplayInRect:renderWidgetHostView_->invalid_rect_];
1681 renderWidgetHostView_->call_set_needs_display_in_rect_pending_ = false; 1669 renderWidgetHostView_->call_set_needs_display_in_rect_pending_ = false;
1682 renderWidgetHostView_->invalid_rect_ = NSZeroRect; 1670 renderWidgetHostView_->invalid_rect_ = NSZeroRect;
1683 1671
1684 renderWidgetHostView_->HandleDelayedGpuViewHiding(); 1672 renderWidgetHostView_->HandleDelayedGpuViewHiding();
1685 } 1673 }
1686 1674
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2749 if (!string) return NO; 2737 if (!string) return NO;
2750 2738
2751 // If the user is currently using an IME, confirm the IME input, 2739 // If the user is currently using an IME, confirm the IME input,
2752 // and then insert the text from the service, the same as TextEdit and Safari. 2740 // and then insert the text from the service, the same as TextEdit and Safari.
2753 [self confirmComposition]; 2741 [self confirmComposition];
2754 [self insertText:string]; 2742 [self insertText:string];
2755 return YES; 2743 return YES;
2756 } 2744 }
2757 2745
2758 @end 2746 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698