| 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 ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ | 5 #ifndef ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ |
| 6 #define ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ | 6 #define ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ |
| 7 | 7 |
| 8 #include "base/timer/timer.h" | 8 #include "base/timer/timer.h" |
| 9 #include "content/public/renderer/render_view_observer.h" | 9 #include "content/public/renderer/render_view_observer.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| 11 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
| 12 | 12 |
| 13 namespace android_webview { | 13 namespace android_webview { |
| 14 | 14 |
| 15 // Render process side of AwRenderViewHostExt, this provides cross-process | 15 // Render process side of AwRenderViewHostExt, this provides cross-process |
| 16 // implementation of miscellaneous WebView functions that we need to poke | 16 // implementation of miscellaneous WebView functions that we need to poke |
| 17 // WebKit directly to implement (and that aren't needed in the chrome app). | 17 // WebKit directly to implement (and that aren't needed in the chrome app). |
| 18 class AwRenderViewExt : public content::RenderViewObserver { | 18 class AwRenderViewExt : public content::RenderViewObserver { |
| 19 public: | 19 public: |
| 20 static void RenderViewCreated(content::RenderView* render_view); | 20 static void RenderViewCreated(content::RenderView* render_view); |
| 21 | 21 |
| 22 private: | 22 private: |
| 23 AwRenderViewExt(content::RenderView* render_view); | 23 AwRenderViewExt(content::RenderView* render_view); |
| 24 ~AwRenderViewExt() override; | 24 ~AwRenderViewExt() override; |
| 25 | 25 |
| 26 // RenderViewObserver: | 26 // RenderViewObserver: |
| 27 void DidCommitCompositorFrame() override; | 27 void DidCommitCompositorFrame() override; |
| 28 void DidUpdateLayout() override; | 28 void DidUpdateLayout() override; |
| 29 void Navigate(const GURL& url) override; | |
| 30 | 29 |
| 31 void CheckContentsSize(); | 30 void CheckContentsSize(); |
| 32 void PostCheckContentsSize(); | 31 void PostCheckContentsSize(); |
| 33 | 32 |
| 34 gfx::Size last_sent_contents_size_; | 33 gfx::Size last_sent_contents_size_; |
| 35 base::OneShotTimer check_contents_size_timer_; | 34 base::OneShotTimer check_contents_size_timer_; |
| 36 | 35 |
| 37 DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt); | 36 DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt); |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 } // namespace android_webview | 39 } // namespace android_webview |
| 41 | 40 |
| 42 #endif // ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ | 41 #endif // ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ |
| OLD | NEW |