| OLD | NEW |
| 1 // Copyright (c) 2012 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MAC_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MAC_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MAC_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 namespace gfx { | 31 namespace gfx { |
| 32 class Point; | 32 class Point; |
| 33 } | 33 } |
| 34 | 34 |
| 35 @interface WebContentsViewCocoa : BaseView { | 35 @interface WebContentsViewCocoa : BaseView { |
| 36 @private | 36 @private |
| 37 WebContentsViewMac* webContentsView_; // WEAK; owns us | 37 WebContentsViewMac* webContentsView_; // WEAK; owns us |
| 38 scoped_nsobject<WebDragSource> dragSource_; | 38 scoped_nsobject<WebDragSource> dragSource_; |
| 39 scoped_nsobject<WebDragDest> dragDest_; | 39 scoped_nsobject<WebDragDest> dragDest_; |
| 40 BOOL mouseDownCanMoveWindow_; |
| 40 } | 41 } |
| 41 | 42 |
| 43 - (void)setMouseDownCanMoveWindow:(BOOL)canMove; |
| 44 |
| 42 // Expose this, since sometimes one needs both the NSView and the | 45 // Expose this, since sometimes one needs both the NSView and the |
| 43 // WebContentsImpl. | 46 // WebContentsImpl. |
| 44 - (WebContentsImpl*)webContents; | 47 - (WebContentsImpl*)webContents; |
| 45 @end | 48 @end |
| 46 | 49 |
| 47 // Mac-specific implementation of the WebContentsView. It owns an NSView that | 50 // Mac-specific implementation of the WebContentsView. It owns an NSView that |
| 48 // contains all of the contents of the tab and associated child views. | 51 // contains all of the contents of the tab and associated child views. |
| 49 class WebContentsViewMac | 52 class WebContentsViewMac |
| 50 : public content::WebContentsView, | 53 : public content::WebContentsView, |
| 51 public content::RenderViewHostDelegateView { | 54 public content::RenderViewHostDelegateView { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 74 virtual void Focus() OVERRIDE; | 77 virtual void Focus() OVERRIDE; |
| 75 virtual void SetInitialFocus() OVERRIDE; | 78 virtual void SetInitialFocus() OVERRIDE; |
| 76 virtual void StoreFocus() OVERRIDE; | 79 virtual void StoreFocus() OVERRIDE; |
| 77 virtual void RestoreFocus() OVERRIDE; | 80 virtual void RestoreFocus() OVERRIDE; |
| 78 virtual bool IsDoingDrag() const OVERRIDE; | 81 virtual bool IsDoingDrag() const OVERRIDE; |
| 79 virtual void CancelDragAndCloseTab() OVERRIDE; | 82 virtual void CancelDragAndCloseTab() OVERRIDE; |
| 80 virtual WebDropData* GetDropData() const OVERRIDE; | 83 virtual WebDropData* GetDropData() const OVERRIDE; |
| 81 virtual bool IsEventTracking() const OVERRIDE; | 84 virtual bool IsEventTracking() const OVERRIDE; |
| 82 virtual void CloseTabAfterEventTracking() OVERRIDE; | 85 virtual void CloseTabAfterEventTracking() OVERRIDE; |
| 83 virtual gfx::Rect GetViewBounds() const OVERRIDE; | 86 virtual gfx::Rect GetViewBounds() const OVERRIDE; |
| 87 virtual void SetMouseDownCanMoveWindow(bool can_move) OVERRIDE; |
| 84 | 88 |
| 85 // Backend implementation of RenderViewHostDelegateView. | 89 // Backend implementation of RenderViewHostDelegateView. |
| 86 virtual void ShowContextMenu( | 90 virtual void ShowContextMenu( |
| 87 const content::ContextMenuParams& params) OVERRIDE; | 91 const content::ContextMenuParams& params) OVERRIDE; |
| 88 virtual void ShowPopupMenu(const gfx::Rect& bounds, | 92 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
| 89 int item_height, | 93 int item_height, |
| 90 double item_font_size, | 94 double item_font_size, |
| 91 int selected_item, | 95 int selected_item, |
| 92 const std::vector<WebMenuItem>& items, | 96 const std::vector<WebMenuItem>& items, |
| 93 bool right_aligned, | 97 bool right_aligned, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 118 // focus returns. | 122 // focus returns. |
| 119 scoped_nsobject<FocusTracker> focus_tracker_; | 123 scoped_nsobject<FocusTracker> focus_tracker_; |
| 120 | 124 |
| 121 // Our optional delegate. | 125 // Our optional delegate. |
| 122 scoped_ptr<content::WebContentsViewDelegate> delegate_; | 126 scoped_ptr<content::WebContentsViewDelegate> delegate_; |
| 123 | 127 |
| 124 DISALLOW_COPY_AND_ASSIGN(WebContentsViewMac); | 128 DISALLOW_COPY_AND_ASSIGN(WebContentsViewMac); |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MAC_H_ | 131 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MAC_H_ |
| OLD | NEW |