| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/mac/scoped_nsobject.h" | 13 #include "base/mac/scoped_nsobject.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "content/common/drag_event_source_info.h" | 16 #include "content/common/drag_event_source_info.h" |
| 17 #include "content/port/browser/render_view_host_delegate_view.h" | 17 #include "content/port/browser/render_view_host_delegate_view.h" |
| 18 #include "content/port/browser/web_contents_view_port.h" | 18 #include "content/port/browser/web_contents_view_port.h" |
| 19 #include "ui/base/cocoa/base_view.h" | 19 #include "ui/base/cocoa/base_view.h" |
| 20 #include "ui/gfx/size.h" | 20 #include "ui/gfx/size.h" |
| 21 | 21 |
| 22 @class FocusTracker; | 22 @class FocusTracker; |
| 23 class SkBitmap; | 23 class SkBitmap; |
| 24 @class WebDragDest; | 24 @class WebDragDest; |
| 25 @class WebDragSource; | 25 @class WebDragSource; |
| 26 | 26 |
| 27 namespace content { | 27 namespace content { |
| 28 class PopupMenuHelper; |
| 28 class WebContentsImpl; | 29 class WebContentsImpl; |
| 29 class WebContentsViewDelegate; | 30 class WebContentsViewDelegate; |
| 30 class WebContentsViewMac; | 31 class WebContentsViewMac; |
| 31 } | 32 } |
| 32 | 33 |
| 33 namespace gfx { | 34 namespace gfx { |
| 34 class Vector2d; | 35 class Vector2d; |
| 35 } | 36 } |
| 36 | 37 |
| 37 CONTENT_EXPORT | 38 CONTENT_EXPORT |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Backend implementation of RenderViewHostDelegateView. | 102 // Backend implementation of RenderViewHostDelegateView. |
| 102 virtual void ShowContextMenu(content::RenderFrameHost* render_frame_host, | 103 virtual void ShowContextMenu(content::RenderFrameHost* render_frame_host, |
| 103 const ContextMenuParams& params) OVERRIDE; | 104 const ContextMenuParams& params) OVERRIDE; |
| 104 virtual void ShowPopupMenu(const gfx::Rect& bounds, | 105 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
| 105 int item_height, | 106 int item_height, |
| 106 double item_font_size, | 107 double item_font_size, |
| 107 int selected_item, | 108 int selected_item, |
| 108 const std::vector<MenuItem>& items, | 109 const std::vector<MenuItem>& items, |
| 109 bool right_aligned, | 110 bool right_aligned, |
| 110 bool allow_multiple_selection) OVERRIDE; | 111 bool allow_multiple_selection) OVERRIDE; |
| 112 virtual void HidePopupMenu() OVERRIDE; |
| 111 virtual void StartDragging(const DropData& drop_data, | 113 virtual void StartDragging(const DropData& drop_data, |
| 112 blink::WebDragOperationsMask allowed_operations, | 114 blink::WebDragOperationsMask allowed_operations, |
| 113 const gfx::ImageSkia& image, | 115 const gfx::ImageSkia& image, |
| 114 const gfx::Vector2d& image_offset, | 116 const gfx::Vector2d& image_offset, |
| 115 const DragEventSourceInfo& event_info) OVERRIDE; | 117 const DragEventSourceInfo& event_info) OVERRIDE; |
| 116 virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; | 118 virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; |
| 117 virtual void GotFocus() OVERRIDE; | 119 virtual void GotFocus() OVERRIDE; |
| 118 virtual void TakeFocus(bool reverse) OVERRIDE; | 120 virtual void TakeFocus(bool reverse) OVERRIDE; |
| 119 | 121 |
| 120 // A helper method for closing the tab in the | 122 // A helper method for closing the tab in the |
| (...skipping 27 matching lines...) Expand all Loading... |
| 148 // Overlay view has |underlay_view_| set to this view. | 150 // Overlay view has |underlay_view_| set to this view. |
| 149 WebContentsViewMac* overlay_view_; | 151 WebContentsViewMac* overlay_view_; |
| 150 | 152 |
| 151 // The offset of overlay view relative to this view. | 153 // The offset of overlay view relative to this view. |
| 152 gfx::Point overlay_view_offset_; | 154 gfx::Point overlay_view_offset_; |
| 153 | 155 |
| 154 // The underlay view which this view is rendered above. | 156 // The underlay view which this view is rendered above. |
| 155 // Underlay view has |overlay_view_| set to this view. | 157 // Underlay view has |overlay_view_| set to this view. |
| 156 WebContentsViewMac* underlay_view_; | 158 WebContentsViewMac* underlay_view_; |
| 157 | 159 |
| 160 scoped_ptr<PopupMenuHelper> popup_menu_helper_; |
| 161 |
| 158 DISALLOW_COPY_AND_ASSIGN(WebContentsViewMac); | 162 DISALLOW_COPY_AND_ASSIGN(WebContentsViewMac); |
| 159 }; | 163 }; |
| 160 | 164 |
| 161 } // namespace content | 165 } // namespace content |
| 162 | 166 |
| 163 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MAC_H_ | 167 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_MAC_H_ |
| OLD | NEW |