| 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_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/callback.h" | 12 #include "base/callback.h" |
| 12 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 13 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
| 14 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 17 #include "content/browser/renderer_host/image_transport_factory.h" | 18 #include "content/browser/renderer_host/image_transport_factory.h" |
| 18 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 19 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 19 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 20 #include "third_party/skia/include/core/SkRegion.h" | 21 #include "third_party/skia/include/core/SkRegion.h" |
| 21 #include "ui/aura/client/activation_change_observer.h" | 22 #include "ui/aura/client/activation_change_observer.h" |
| 22 #include "ui/aura/client/activation_delegate.h" | 23 #include "ui/aura/client/activation_delegate.h" |
| 23 #include "ui/aura/client/focus_change_observer.h" | 24 #include "ui/aura/client/focus_change_observer.h" |
| 24 #include "ui/aura/window_delegate.h" | 25 #include "ui/aura/window_delegate.h" |
| 25 #include "ui/base/ime/text_input_client.h" | 26 #include "ui/base/ime/text_input_client.h" |
| 26 #include "ui/compositor/compositor.h" | 27 #include "ui/compositor/compositor.h" |
| 27 #include "ui/compositor/compositor_observer.h" | 28 #include "ui/compositor/compositor_observer.h" |
| 28 #include "ui/gfx/display_observer.h" | 29 #include "ui/gfx/display_observer.h" |
| 29 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
| 31 #include "webkit/compositor_bindings/web_latency_info_impl.h" |
| 30 #include "webkit/glue/webcursor.h" | 32 #include "webkit/glue/webcursor.h" |
| 31 | 33 |
| 32 namespace aura { | 34 namespace aura { |
| 33 class WindowTracker; | 35 class WindowTracker; |
| 34 } | 36 } |
| 35 | 37 |
| 36 namespace gfx { | 38 namespace gfx { |
| 37 class Canvas; | 39 class Canvas; |
| 38 class Display; | 40 class Display; |
| 39 } | 41 } |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 class WindowObserver; | 228 class WindowObserver; |
| 227 friend class WindowObserver; | 229 friend class WindowObserver; |
| 228 | 230 |
| 229 // Overridden from ui::CompositorObserver: | 231 // Overridden from ui::CompositorObserver: |
| 230 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE; | 232 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE; |
| 231 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE; | 233 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE; |
| 232 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE; | 234 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE; |
| 233 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE; | 235 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE; |
| 234 virtual void OnCompositingLockStateChanged( | 236 virtual void OnCompositingLockStateChanged( |
| 235 ui::Compositor* compositor) OVERRIDE; | 237 ui::Compositor* compositor) OVERRIDE; |
| 238 virtual void OnReceivedLatencyInfo(ui::Compositor* compositor, |
| 239 const WebKit::WebLatencyInfoImpl& latency_info) OVERRIDE; |
| 236 | 240 |
| 237 // Overridden from ImageTransportFactoryObserver: | 241 // Overridden from ImageTransportFactoryObserver: |
| 238 virtual void OnLostResources() OVERRIDE; | 242 virtual void OnLostResources() OVERRIDE; |
| 239 | 243 |
| 240 virtual ~RenderWidgetHostViewAura(); | 244 virtual ~RenderWidgetHostViewAura(); |
| 241 | 245 |
| 242 void UpdateCursorIfOverSelf(); | 246 void UpdateCursorIfOverSelf(); |
| 243 bool ShouldSkipFrame(const gfx::Size& size); | 247 bool ShouldSkipFrame(const gfx::Size& size); |
| 244 void UpdateExternalTexture(); | 248 void UpdateExternalTexture(); |
| 245 ui::InputMethod* GetInputMethod() const; | 249 ui::InputMethod* GetInputMethod() const; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 YES, | 435 YES, |
| 432 // We locked, so at some point we'll need to kick a frame. | 436 // We locked, so at some point we'll need to kick a frame. |
| 433 YES_DID_LOCK, | 437 YES_DID_LOCK, |
| 434 // No. A lock timed out, we need to kick a new frame before locking again. | 438 // No. A lock timed out, we need to kick a new frame before locking again. |
| 435 NO_PENDING_RENDERER_FRAME, | 439 NO_PENDING_RENDERER_FRAME, |
| 436 // No. We've got a frame, but it hasn't been committed. | 440 // No. We've got a frame, but it hasn't been committed. |
| 437 NO_PENDING_COMMIT, | 441 NO_PENDING_COMMIT, |
| 438 }; | 442 }; |
| 439 CanLockCompositorState can_lock_compositor_; | 443 CanLockCompositorState can_lock_compositor_; |
| 440 | 444 |
| 445 struct FrameLatency { |
| 446 WebKit::WebLatencyInfoImpl latency_info; |
| 447 int route_id; |
| 448 int gpu_host_id; |
| 449 }; |
| 450 |
| 451 std::queue<FrameLatency> frame_queue_; |
| 452 |
| 441 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 453 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 442 }; | 454 }; |
| 443 | 455 |
| 444 } // namespace content | 456 } // namespace content |
| 445 | 457 |
| 446 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 458 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |