| 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 <string> | 10 #include <string> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 virtual void ShowCreatedWidgetInternal(RenderWidgetHostView* widget_host_view, | 67 virtual void ShowCreatedWidgetInternal(RenderWidgetHostView* widget_host_view, |
| 68 const gfx::Rect& initial_pos); | 68 const gfx::Rect& initial_pos); |
| 69 | 69 |
| 70 // Backend implementation of RenderViewHostDelegate::View. | 70 // Backend implementation of RenderViewHostDelegate::View. |
| 71 virtual void ShowContextMenu(const ContextMenuParams& params); | 71 virtual void ShowContextMenu(const ContextMenuParams& params); |
| 72 virtual void StartDragging(const WebDropData& drop_data, | 72 virtual void StartDragging(const WebDropData& drop_data, |
| 73 WebKit::WebDragOperationsMask allowed_operations); | 73 WebKit::WebDragOperationsMask allowed_operations); |
| 74 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); | 74 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); |
| 75 virtual void GotFocus(); | 75 virtual void GotFocus(); |
| 76 virtual void TakeFocus(bool reverse); | 76 virtual void TakeFocus(bool reverse); |
| 77 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 77 virtual bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
| 78 | 78 |
| 79 // NotificationObserver implementation --------------------------------------- | 79 // NotificationObserver implementation --------------------------------------- |
| 80 | 80 |
| 81 virtual void Observe(NotificationType type, | 81 virtual void Observe(NotificationType type, |
| 82 const NotificationSource& source, | 82 const NotificationSource& source, |
| 83 const NotificationDetails& details); | 83 const NotificationDetails& details); |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 // The Cocoa NSView that lives in the view hierarchy. | 86 // The Cocoa NSView that lives in the view hierarchy. |
| 87 scoped_nsobject<TabContentsViewCocoa> cocoa_view_; | 87 scoped_nsobject<TabContentsViewCocoa> cocoa_view_; |
| 88 | 88 |
| 89 // Keeps track of which NSView has focus so we can restore the focus when | 89 // Keeps track of which NSView has focus so we can restore the focus when |
| 90 // focus returns. | 90 // focus returns. |
| 91 scoped_nsobject<FocusTracker> focus_tracker_; | 91 scoped_nsobject<FocusTracker> focus_tracker_; |
| 92 | 92 |
| 93 // Used to get notifications about renderers coming and going. | 93 // Used to get notifications about renderers coming and going. |
| 94 NotificationRegistrar registrar_; | 94 NotificationRegistrar registrar_; |
| 95 | 95 |
| 96 // Used to render the sad tab. This will be non-NULL only when the sad tab is | 96 // Used to render the sad tab. This will be non-NULL only when the sad tab is |
| 97 // visible. | 97 // visible. |
| 98 scoped_nsobject<SadTabView> sad_tab_; | 98 scoped_nsobject<SadTabView> sad_tab_; |
| 99 | 99 |
| 100 // The page content's intrinsic width. | 100 // The page content's intrinsic width. |
| 101 int preferred_width_; | 101 int preferred_width_; |
| 102 | 102 |
| 103 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); | 103 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 106 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| OLD | NEW |