| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(__OBJC__) | 9 #if defined(__OBJC__) |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 @interface TabContentsViewCocoa : BaseView { | 37 @interface TabContentsViewCocoa : BaseView { |
| 38 @private | 38 @private |
| 39 TabContentsViewMac* tabContentsView_; // WEAK; owns us | 39 TabContentsViewMac* tabContentsView_; // WEAK; owns us |
| 40 scoped_nsobject<WebDragSource> dragSource_; | 40 scoped_nsobject<WebDragSource> dragSource_; |
| 41 scoped_nsobject<WebDragDest> dragDest_; | 41 scoped_nsobject<WebDragDest> dragDest_; |
| 42 scoped_ptr<WebDragBookmarkHandlerMac> bookmarkHandler_; | 42 scoped_ptr<WebDragBookmarkHandlerMac> bookmarkHandler_; |
| 43 } | 43 } |
| 44 | 44 |
| 45 // Expose this, since sometimes one needs both the NSView and the TabContents. | 45 // Expose this, since sometimes one needs both the NSView and the TabContents. |
| 46 - (TabContents*)tabContents; | 46 - (TabContents*)tabContents; |
| 47 |
| 48 // Set frame, then notify the RenderWidgetHost that the frame has been changed, |
| 49 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. |
| 50 // This stops the flickering issue in http://crbug.com/31970 |
| 51 - (void)setFrameWithDeferredUpdate:(NSRect)frame; |
| 47 @end | 52 @end |
| 48 | 53 |
| 49 // Mac-specific implementation of the TabContentsView. It owns an NSView that | 54 // Mac-specific implementation of the TabContentsView. It owns an NSView that |
| 50 // contains all of the contents of the tab and associated child views. | 55 // contains all of the contents of the tab and associated child views. |
| 51 class TabContentsViewMac : public TabContentsView, | 56 class TabContentsViewMac : public TabContentsView, |
| 52 public content::NotificationObserver { | 57 public content::NotificationObserver { |
| 53 public: | 58 public: |
| 54 // The corresponding TabContents is passed in the constructor, and manages our | 59 // The corresponding TabContents is passed in the constructor, and manages our |
| 55 // lifetime. This doesn't need to be the case, but is this way currently | 60 // lifetime. This doesn't need to be the case, but is this way currently |
| 56 // because that's what was easiest when they were split. | 61 // because that's what was easiest when they were split. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 160 |
| 156 // Functions that may be accessed from non-Objective-C C/C++ code. | 161 // Functions that may be accessed from non-Objective-C C/C++ code. |
| 157 class TabContents; | 162 class TabContents; |
| 158 class TabContentsView; | 163 class TabContentsView; |
| 159 | 164 |
| 160 namespace tab_contents_view_mac { | 165 namespace tab_contents_view_mac { |
| 161 TabContentsView* CreateTabContentsView(TabContents* tab_contents); | 166 TabContentsView* CreateTabContentsView(TabContents* tab_contents); |
| 162 } | 167 } |
| 163 | 168 |
| 164 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 169 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| OLD | NEW |