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

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

Issue 8520036: Revert 110262 - Have ExtensionHost use TabContents instead of RenderViewHost. Try #2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 } 1663 }
1664 1664
1665 - (void)setFrameSize:(NSSize)newSize { 1665 - (void)setFrameSize:(NSSize)newSize {
1666 // NB: -[NSView setFrame:] calls through -setFrameSize:, so overriding 1666 // NB: -[NSView setFrame:] calls through -setFrameSize:, so overriding
1667 // -setFrame: isn't neccessary. 1667 // -setFrame: isn't neccessary.
1668 [super setFrameSize:newSize]; 1668 [super setFrameSize:newSize];
1669 if (renderWidgetHostView_->render_widget_host_) 1669 if (renderWidgetHostView_->render_widget_host_)
1670 renderWidgetHostView_->render_widget_host_->WasResized(); 1670 renderWidgetHostView_->render_widget_host_->WasResized();
1671 } 1671 }
1672 1672
1673 - (void)setFrameWithDeferredUpdate:(NSRect)frameRect {
1674 [super setFrame:frameRect];
1675 [self performSelector:@selector(renderWidgetHostWasResized)
1676 withObject:nil
1677 afterDelay:0];
1678 }
1679
1680 - (void)renderWidgetHostWasResized {
1681 if (renderWidgetHostView_->render_widget_host_)
1682 renderWidgetHostView_->render_widget_host_->WasResized();
1683 }
1684
1673 - (void)callSetNeedsDisplayInRect { 1685 - (void)callSetNeedsDisplayInRect {
1674 DCHECK([NSThread isMainThread]); 1686 DCHECK([NSThread isMainThread]);
1675 DCHECK(renderWidgetHostView_->call_set_needs_display_in_rect_pending_); 1687 DCHECK(renderWidgetHostView_->call_set_needs_display_in_rect_pending_);
1676 [self setNeedsDisplayInRect:renderWidgetHostView_->invalid_rect_]; 1688 [self setNeedsDisplayInRect:renderWidgetHostView_->invalid_rect_];
1677 renderWidgetHostView_->call_set_needs_display_in_rect_pending_ = false; 1689 renderWidgetHostView_->call_set_needs_display_in_rect_pending_ = false;
1678 renderWidgetHostView_->invalid_rect_ = NSZeroRect; 1690 renderWidgetHostView_->invalid_rect_ = NSZeroRect;
1679 1691
1680 renderWidgetHostView_->HandleDelayedGpuViewHiding(); 1692 renderWidgetHostView_->HandleDelayedGpuViewHiding();
1681 } 1693 }
1682 1694
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2745 if (!string) return NO; 2757 if (!string) return NO;
2746 2758
2747 // If the user is currently using an IME, confirm the IME input, 2759 // If the user is currently using an IME, confirm the IME input,
2748 // and then insert the text from the service, the same as TextEdit and Safari. 2760 // and then insert the text from the service, the same as TextEdit and Safari.
2749 [self confirmComposition]; 2761 [self confirmComposition];
2750 [self insertText:string]; 2762 [self insertText:string];
2751 return YES; 2763 return YES;
2752 } 2764 }
2753 2765
2754 @end 2766 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698