Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: android_webview/browser/renderer_host/aw_render_view_host_ext.h

Issue 2685553004: Convert AwRenderViewHostExt to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/browser/renderer_host/aw_render_view_host_ext.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
7 7
8 #include "content/public/browser/web_contents_observer.h" 8 #include "content/public/browser/web_contents_observer.h"
9 9
10 #include "android_webview/common/aw_hit_test_data.h" 10 #include "android_webview/common/aw_hit_test_data.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/threading/non_thread_safe.h" 13 #include "base/threading/non_thread_safe.h"
14 #include "third_party/skia/include/core/SkColor.h" 14 #include "third_party/skia/include/core/SkColor.h"
15 #include "ui/gfx/geometry/point_f.h" 15 #include "ui/gfx/geometry/point_f.h"
16 #include "ui/gfx/geometry/size.h" 16 #include "ui/gfx/geometry/size.h"
17 #include "ui/gfx/geometry/size_f.h" 17 #include "ui/gfx/geometry/size_f.h"
18 18
19 namespace content {
20 struct FrameNavigateParams;
21 struct LoadCommittedDetails;
22 } // namespace content
23
24 namespace android_webview { 19 namespace android_webview {
25 20
26 class AwRenderViewHostExtClient { 21 class AwRenderViewHostExtClient {
27 public: 22 public:
28 // Called when the RenderView page scale changes. 23 // Called when the RenderView page scale changes.
29 virtual void OnWebLayoutPageScaleFactorChanged(float page_scale_factor) = 0; 24 virtual void OnWebLayoutPageScaleFactorChanged(float page_scale_factor) = 0;
30 virtual void OnWebLayoutContentsSizeChanged( 25 virtual void OnWebLayoutContentsSizeChanged(
31 const gfx::Size& contents_size) = 0; 26 const gfx::Size& contents_size) = 0;
32 27
33 protected: 28 protected:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void SetJsOnlineProperty(bool network_up); 75 void SetJsOnlineProperty(bool network_up);
81 76
82 void SmoothScroll(int target_x, int target_y, long duration_ms); 77 void SmoothScroll(int target_x, int target_y, long duration_ms);
83 78
84 private: 79 private:
85 // content::WebContentsObserver implementation. 80 // content::WebContentsObserver implementation.
86 void RenderViewCreated(content::RenderViewHost* view_host) override; 81 void RenderViewCreated(content::RenderViewHost* view_host) override;
87 void RenderViewHostChanged(content::RenderViewHost* old_host, 82 void RenderViewHostChanged(content::RenderViewHost* old_host,
88 content::RenderViewHost* new_host) override; 83 content::RenderViewHost* new_host) override;
89 void RenderFrameCreated(content::RenderFrameHost* frame_host) override; 84 void RenderFrameCreated(content::RenderFrameHost* frame_host) override;
90 void DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host, 85 void DidFinishNavigation(
91 const content::LoadCommittedDetails& details, 86 content::NavigationHandle* navigation_handle) override;
92 const content::FrameNavigateParams& params) override;
93 void OnPageScaleFactorChanged(float page_scale_factor) override; 87 void OnPageScaleFactorChanged(float page_scale_factor) override;
94 bool OnMessageReceived(const IPC::Message& message, 88 bool OnMessageReceived(const IPC::Message& message,
95 content::RenderFrameHost* render_frame_host) override; 89 content::RenderFrameHost* render_frame_host) override;
96 90
97 void OnDocumentHasImagesResponse(content::RenderFrameHost* render_frame_host, 91 void OnDocumentHasImagesResponse(content::RenderFrameHost* render_frame_host,
98 int msg_id, 92 int msg_id,
99 bool has_images); 93 bool has_images);
100 void OnUpdateHitTestData(content::RenderFrameHost* render_frame_host, 94 void OnUpdateHitTestData(content::RenderFrameHost* render_frame_host,
101 const AwHitTestData& hit_test_data); 95 const AwHitTestData& hit_test_data);
102 void OnContentsSizeChanged(content::RenderFrameHost* render_frame_host, 96 void OnContentsSizeChanged(content::RenderFrameHost* render_frame_host,
(...skipping 16 matching lines...) Expand all
119 AwHitTestData last_hit_test_data_; 113 AwHitTestData last_hit_test_data_;
120 114
121 bool has_new_hit_test_data_; 115 bool has_new_hit_test_data_;
122 116
123 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt); 117 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt);
124 }; 118 };
125 119
126 } // namespace android_webview 120 } // namespace android_webview
127 121
128 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 122 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/renderer_host/aw_render_view_host_ext.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698