| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 virtual void TakeFocus(bool reverse); | 67 virtual void TakeFocus(bool reverse); |
| 68 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 68 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
| 69 | 69 |
| 70 // NotificationObserver implementation --------------------------------------- | 70 // NotificationObserver implementation --------------------------------------- |
| 71 | 71 |
| 72 virtual void Observe(NotificationType type, | 72 virtual void Observe(NotificationType type, |
| 73 const NotificationSource& source, | 73 const NotificationSource& source, |
| 74 const NotificationDetails& details); | 74 const NotificationDetails& details); |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 // --------------------------------------------------------------------------- | 77 // Returns a drag pasteboard filled with the appropriate data. The types are |
| 78 // populated in decending order of richness. |
| 79 NSPasteboard* FillDragData(const WebDropData& drop_data); |
| 78 | 80 |
| 79 // The Cocoa NSView that lives in the view hierarchy. | 81 // The Cocoa NSView that lives in the view hierarchy. |
| 80 scoped_nsobject<TabContentsViewCocoa> cocoa_view_; | 82 scoped_nsobject<TabContentsViewCocoa> cocoa_view_; |
| 81 | 83 |
| 82 // The Cocoa NSView to restore the focus to when focus returns. | 84 // The Cocoa NSView to restore the focus to when focus returns. |
| 83 scoped_nsobject<NSView> latent_focus_view_; | 85 scoped_nsobject<NSView> latent_focus_view_; |
| 84 | 86 |
| 85 // Used to get notifications about renderers coming and going. | 87 // Used to get notifications about renderers coming and going. |
| 86 NotificationRegistrar registrar_; | 88 NotificationRegistrar registrar_; |
| 87 | 89 |
| 88 // Used to render the sad tab. This will be non-NULL only when the sad tab is | 90 // Used to render the sad tab. This will be non-NULL only when the sad tab is |
| 89 // visible. | 91 // visible. |
| 90 scoped_nsobject<SadTabView> sad_tab_; | 92 scoped_nsobject<SadTabView> sad_tab_; |
| 91 | 93 |
| 92 // The page content's intrinsic width. | 94 // The page content's intrinsic width. |
| 93 int preferred_width_; | 95 int preferred_width_; |
| 94 | 96 |
| 95 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); | 97 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); |
| 96 }; | 98 }; |
| 97 | 99 |
| 98 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 100 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| OLD | NEW |