| OLD | NEW |
| 1 // Copyright (c) 2011 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 #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 |
| 11 #import <Cocoa/Cocoa.h> | 11 #import <Cocoa/Cocoa.h> |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; | 113 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; |
| 114 virtual void GotFocus() OVERRIDE; | 114 virtual void GotFocus() OVERRIDE; |
| 115 virtual void TakeFocus(bool reverse) OVERRIDE; | 115 virtual void TakeFocus(bool reverse) OVERRIDE; |
| 116 | 116 |
| 117 // A helper method for closing the tab in the | 117 // A helper method for closing the tab in the |
| 118 // CloseTabAfterEventTracking() implementation. | 118 // CloseTabAfterEventTracking() implementation. |
| 119 void CloseTab(); | 119 void CloseTab(); |
| 120 | 120 |
| 121 TabContents* tab_contents() { return tab_contents_; } | 121 TabContents* tab_contents() { return tab_contents_; } |
| 122 int preferred_width() const { return preferred_width_; } | 122 int preferred_width() const { return preferred_width_; } |
| 123 void set_preferred_width(int preferred_width) { |
| 124 preferred_width_ = preferred_width; |
| 125 } |
| 123 | 126 |
| 124 private: | 127 private: |
| 125 // The TabContents whose contents we display. | 128 // The TabContents whose contents we display. |
| 126 TabContents* tab_contents_; | 129 TabContents* tab_contents_; |
| 127 | 130 |
| 128 // Common implementations of some RenderViewHostDelegate::View methods. | 131 // Common implementations of some RenderViewHostDelegate::View methods. |
| 129 RenderViewHostDelegateViewHelper delegate_view_helper_; | 132 RenderViewHostDelegateViewHelper delegate_view_helper_; |
| 130 | 133 |
| 131 // The Cocoa NSView that lives in the view hierarchy. | 134 // The Cocoa NSView that lives in the view hierarchy. |
| 132 scoped_nsobject<TabContentsViewCocoa> cocoa_view_; | 135 scoped_nsobject<TabContentsViewCocoa> cocoa_view_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 152 | 155 |
| 153 // Functions that may be accessed from non-Objective-C C/C++ code. | 156 // Functions that may be accessed from non-Objective-C C/C++ code. |
| 154 class TabContents; | 157 class TabContents; |
| 155 class TabContentsView; | 158 class TabContentsView; |
| 156 | 159 |
| 157 namespace tab_contents_view_mac { | 160 namespace tab_contents_view_mac { |
| 158 TabContentsView* CreateTabContentsView(TabContents* tab_contents); | 161 TabContentsView* CreateTabContentsView(TabContents* tab_contents); |
| 159 } | 162 } |
| 160 | 163 |
| 161 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 164 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| OLD | NEW |