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 <IOSurface/IOSurface.h> | 9 #include <IOSurface/IOSurface.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
11 #include <stdint.h> | 11 #include <stdint.h> |
12 #include <list> | 12 #include <list> |
13 #include <map> | 13 #include <map> |
14 #include <set> | 14 #include <set> |
15 #include <string> | 15 #include <string> |
16 #include <utility> | 16 #include <utility> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "base/mac/scoped_nsobject.h" | 19 #include "base/mac/scoped_nsobject.h" |
20 #include "base/macros.h" | 20 #include "base/macros.h" |
21 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
22 #include "base/memory/weak_ptr.h" | 22 #include "base/memory/weak_ptr.h" |
23 #include "base/time/time.h" | 23 #include "base/time/time.h" |
| 24 #include "cc/surfaces/surface_id.h" |
24 #include "content/browser/compositor/browser_compositor_view_mac.h" | 25 #include "content/browser/compositor/browser_compositor_view_mac.h" |
25 #include "content/browser/compositor/delegated_frame_host.h" | 26 #include "content/browser/compositor/delegated_frame_host.h" |
26 #include "content/browser/renderer_host/input/mouse_wheel_rails_filter_mac.h" | 27 #include "content/browser/renderer_host/input/mouse_wheel_rails_filter_mac.h" |
27 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 28 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
28 #include "content/common/content_export.h" | 29 #include "content/common/content_export.h" |
29 #include "content/common/cursors/webcursor.h" | 30 #include "content/common/cursors/webcursor.h" |
30 #include "content/common/edit_command.h" | 31 #include "content/common/edit_command.h" |
31 #include "ipc/ipc_sender.h" | 32 #include "ipc/ipc_sender.h" |
32 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 33 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
33 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" | 34 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 // AcceleratedWidgetMacNSView implementation. | 523 // AcceleratedWidgetMacNSView implementation. |
523 NSView* AcceleratedWidgetGetNSView() const override; | 524 NSView* AcceleratedWidgetGetNSView() const override; |
524 void AcceleratedWidgetGetVSyncParameters( | 525 void AcceleratedWidgetGetVSyncParameters( |
525 base::TimeTicks* timebase, base::TimeDelta* interval) const override; | 526 base::TimeTicks* timebase, base::TimeDelta* interval) const override; |
526 void AcceleratedWidgetSwapCompleted() override; | 527 void AcceleratedWidgetSwapCompleted() override; |
527 | 528 |
528 // Transition from being in the Suspended state to being in the Destroyed | 529 // Transition from being in the Suspended state to being in the Destroyed |
529 // state, if appropriate (see BrowserCompositorViewState for details). | 530 // state, if appropriate (see BrowserCompositorViewState for details). |
530 void DestroySuspendedBrowserCompositorViewIfNeeded(); | 531 void DestroySuspendedBrowserCompositorViewIfNeeded(); |
531 | 532 |
| 533 // Exposed for testing. |
| 534 cc::SurfaceId SurfaceIdForTesting() const override; |
| 535 |
532 private: | 536 private: |
533 friend class RenderWidgetHostViewMacTest; | 537 friend class RenderWidgetHostViewMacTest; |
534 | 538 |
535 // Returns whether this render view is a popup (autocomplete window). | 539 // Returns whether this render view is a popup (autocomplete window). |
536 bool IsPopup() const; | 540 bool IsPopup() const; |
537 | 541 |
538 // Shuts down the render_widget_host_. This is a separate function so we can | 542 // Shuts down the render_widget_host_. This is a separate function so we can |
539 // invoke it from the message loop. | 543 // invoke it from the message loop. |
540 void ShutdownHost(); | 544 void ShutdownHost(); |
541 | 545 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 | 617 |
614 // Factory used to safely scope delayed calls to ShutdownHost(). | 618 // Factory used to safely scope delayed calls to ShutdownHost(). |
615 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 619 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
616 | 620 |
617 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 621 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
618 }; | 622 }; |
619 | 623 |
620 } // namespace content | 624 } // namespace content |
621 | 625 |
622 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 626 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |