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/IOSurfaceAPI.h> | 9 #include <IOSurface/IOSurfaceAPI.h> |
10 #include <list> | 10 #include <list> |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; | 338 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; |
339 void GetScreenInfo(blink::WebScreenInfo* results) override; | 339 void GetScreenInfo(blink::WebScreenInfo* results) override; |
340 gfx::Rect GetBoundsInRootWindow() override; | 340 gfx::Rect GetBoundsInRootWindow() override; |
341 gfx::GLSurfaceHandle GetCompositingSurface() override; | 341 gfx::GLSurfaceHandle GetCompositingSurface() override; |
342 | 342 |
343 bool LockMouse() override; | 343 bool LockMouse() override; |
344 void UnlockMouse() override; | 344 void UnlockMouse() override; |
345 void WheelEventAck(const blink::WebMouseWheelEvent& event, | 345 void WheelEventAck(const blink::WebMouseWheelEvent& event, |
346 InputEventAckState ack_result) override; | 346 InputEventAckState ack_result) override; |
347 | 347 |
348 uint32_t GetSurfaceIdNamespace() override; | |
349 | |
350 // IPC::Sender implementation. | 348 // IPC::Sender implementation. |
351 bool Send(IPC::Message* message) override; | 349 bool Send(IPC::Message* message) override; |
352 | 350 |
353 SkColorType PreferredReadbackFormat() override; | 351 SkColorType PreferredReadbackFormat() override; |
354 | 352 |
355 // gfx::DisplayObserver implementation. | 353 // gfx::DisplayObserver implementation. |
356 void OnDisplayAdded(const gfx::Display& new_display) override; | 354 void OnDisplayAdded(const gfx::Display& new_display) override; |
357 void OnDisplayRemoved(const gfx::Display& old_display) override; | 355 void OnDisplayRemoved(const gfx::Display& old_display) override; |
358 void OnDisplayMetricsChanged(const gfx::Display& display, | 356 void OnDisplayMetricsChanged(const gfx::Display& display, |
359 uint32_t metrics) override; | 357 uint32_t metrics) override; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 // - |browser_compositor_| has been destroyed and | 433 // - |browser_compositor_| has been destroyed and |
436 // |delegated_frame_host_| has been hidden. | 434 // |delegated_frame_host_| has been hidden. |
437 // Happens when: | 435 // Happens when: |
438 // - The |render_widget_host_| is hidden or dead, and |cocoa_view_| is not | 436 // - The |render_widget_host_| is hidden or dead, and |cocoa_view_| is not |
439 // attached to a NSWindow. | 437 // attached to a NSWindow. |
440 // - This happens for backgrounded tabs. | 438 // - This happens for backgrounded tabs. |
441 BrowserCompositorDestroyed, | 439 BrowserCompositorDestroyed, |
442 }; | 440 }; |
443 BrowserCompositorViewState browser_compositor_state_; | 441 BrowserCompositorViewState browser_compositor_state_; |
444 | 442 |
445 // Delegated frame management and compositor. | 443 // Delegated frame management and compositior. |
446 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; | 444 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; |
447 scoped_ptr<ui::Layer> root_layer_; | 445 scoped_ptr<ui::Layer> root_layer_; |
448 | 446 |
449 // Container for ui::Compositor the CALayer tree drawn by it. | 447 // Container for ui::Compositor the CALayer tree drawn by it. |
450 scoped_ptr<BrowserCompositorMac> browser_compositor_; | 448 scoped_ptr<BrowserCompositorMac> browser_compositor_; |
451 | 449 |
452 // Placeholder that is allocated while browser_compositor_ is NULL, | 450 // Placeholder that is allocated while browser_compositor_ is NULL, |
453 // indicating that a BrowserCompositorViewMac may be allocated. This is to | 451 // indicating that a BrowserCompositorViewMac may be allocated. This is to |
454 // help in recycling the internals of BrowserCompositorViewMac. | 452 // help in recycling the internals of BrowserCompositorViewMac. |
455 scoped_ptr<BrowserCompositorMacPlaceholder> | 453 scoped_ptr<BrowserCompositorMacPlaceholder> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 | 587 |
590 // Factory used to safely scope delayed calls to ShutdownHost(). | 588 // Factory used to safely scope delayed calls to ShutdownHost(). |
591 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 589 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
592 | 590 |
593 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 591 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
594 }; | 592 }; |
595 | 593 |
596 } // namespace content | 594 } // namespace content |
597 | 595 |
598 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 596 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |