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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <list> | 9 #include <list> |
| 10 #include <map> |
| 11 #include <string> |
| 12 #include <utility> |
| 13 #include <vector> |
10 | 14 |
11 #include "base/memory/scoped_nsobject.h" | 15 #include "base/memory/scoped_nsobject.h" |
12 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
14 #include "base/time.h" | 18 #include "base/time.h" |
15 #include "content/browser/accessibility/browser_accessibility_delegate_mac.h" | 19 #include "content/browser/accessibility/browser_accessibility_delegate_mac.h" |
16 #include "content/browser/renderer_host/accelerated_surface_container_manager_ma
c.h" | 20 #include "content/browser/renderer_host/accelerated_surface_container_manager_ma
c.h" |
17 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 21 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
18 #include "content/common/edit_command.h" | 22 #include "content/common/edit_command.h" |
19 #import "content/public/browser/render_widget_host_view_mac_base.h" | 23 #import "content/public/browser/render_widget_host_view_mac_base.h" |
(...skipping 29 matching lines...) Expand all Loading... |
49 scoped_ptr<content::RenderWidgetHostViewMac> renderWidgetHostView_; | 53 scoped_ptr<content::RenderWidgetHostViewMac> renderWidgetHostView_; |
50 NSObject<RenderWidgetHostViewMacDelegate>* delegate_; // weak | 54 NSObject<RenderWidgetHostViewMacDelegate>* delegate_; // weak |
51 BOOL canBeKeyView_; | 55 BOOL canBeKeyView_; |
52 BOOL takesFocusOnlyOnMouseDown_; | 56 BOOL takesFocusOnlyOnMouseDown_; |
53 BOOL closeOnDeactivate_; | 57 BOOL closeOnDeactivate_; |
54 scoped_ptr<content::RenderWidgetHostViewMacEditCommandHelper> | 58 scoped_ptr<content::RenderWidgetHostViewMacEditCommandHelper> |
55 editCommand_helper_; | 59 editCommand_helper_; |
56 | 60 |
57 // These are part of the magic tooltip code from WebKit's WebHTMLView: | 61 // These are part of the magic tooltip code from WebKit's WebHTMLView: |
58 id trackingRectOwner_; // (not retained) | 62 id trackingRectOwner_; // (not retained) |
59 void *trackingRectUserData_; | 63 void* trackingRectUserData_; |
60 NSTrackingRectTag lastToolTipTag_; | 64 NSTrackingRectTag lastToolTipTag_; |
61 scoped_nsobject<NSString> toolTip_; | 65 scoped_nsobject<NSString> toolTip_; |
62 | 66 |
63 // Is YES if there was a mouse-down as yet unbalanced with a mouse-up. | 67 // Is YES if there was a mouse-down as yet unbalanced with a mouse-up. |
64 BOOL hasOpenMouseDown_; | 68 BOOL hasOpenMouseDown_; |
65 | 69 |
66 NSWindow* lastWindow_; // weak | 70 NSWindow* lastWindow_; // weak |
67 | 71 |
68 // The cursor for the page. This is passed up from the renderer. | 72 // The cursor for the page. This is passed up from the renderer. |
69 scoped_nsobject<NSCursor> currentCursor_; | 73 scoped_nsobject<NSCursor> currentCursor_; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 virtual void ImeCompositionRangeChanged( | 232 virtual void ImeCompositionRangeChanged( |
229 const ui::Range& range, | 233 const ui::Range& range, |
230 const std::vector<gfx::Rect>& character_bounds) OVERRIDE; | 234 const std::vector<gfx::Rect>& character_bounds) OVERRIDE; |
231 virtual void DidUpdateBackingStore( | 235 virtual void DidUpdateBackingStore( |
232 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, | 236 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, |
233 const std::vector<gfx::Rect>& copy_rects) OVERRIDE; | 237 const std::vector<gfx::Rect>& copy_rects) OVERRIDE; |
234 virtual void RenderViewGone(base::TerminationStatus status, | 238 virtual void RenderViewGone(base::TerminationStatus status, |
235 int error_code) OVERRIDE; | 239 int error_code) OVERRIDE; |
236 virtual void Destroy() OVERRIDE; | 240 virtual void Destroy() OVERRIDE; |
237 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; | 241 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; |
| 242 virtual void SpeakText(const string16& text) OVERRIDE; |
238 virtual void SelectionChanged(const string16& text, | 243 virtual void SelectionChanged(const string16& text, |
239 size_t offset, | 244 size_t offset, |
240 const ui::Range& range) OVERRIDE; | 245 const ui::Range& range) OVERRIDE; |
241 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; | 246 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; |
242 virtual void CopyFromCompositingSurface( | 247 virtual void CopyFromCompositingSurface( |
243 const gfx::Rect& src_subrect, | 248 const gfx::Rect& src_subrect, |
244 const gfx::Size& dst_size, | 249 const gfx::Size& dst_size, |
245 const base::Callback<void(bool)>& callback, | 250 const base::Callback<void(bool)>& callback, |
246 skia::PlatformCanvas* output) OVERRIDE; | 251 skia::PlatformCanvas* output) OVERRIDE; |
247 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; | 252 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 465 |
461 // The current caret bounds. | 466 // The current caret bounds. |
462 gfx::Rect caret_rect_; | 467 gfx::Rect caret_rect_; |
463 | 468 |
464 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 469 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
465 }; | 470 }; |
466 | 471 |
467 } // namespace content | 472 } // namespace content |
468 | 473 |
469 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 474 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |