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

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

Issue 24228003: Upstream ShouldOverrideUrlLoading changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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
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"
(...skipping 10 matching lines...) Expand all
21 } // namespace content 21 } // namespace content
22 22
23 namespace android_webview { 23 namespace android_webview {
24 24
25 class AwRenderViewHostExtClient { 25 class AwRenderViewHostExtClient {
26 public: 26 public:
27 // Called when the RenderView page scale changes. 27 // Called when the RenderView page scale changes.
28 virtual void OnWebLayoutPageScaleFactorChanged(float page_scale_factor) = 0; 28 virtual void OnWebLayoutPageScaleFactorChanged(float page_scale_factor) = 0;
29 virtual void OnWebLayoutContentsSizeChanged( 29 virtual void OnWebLayoutContentsSizeChanged(
30 const gfx::Size& contents_size) = 0; 30 const gfx::Size& contents_size) = 0;
31 // Called when there is a top level navigation.
32 virtual bool OnShouldOverrideUrlLoading(const base::string16& url) = 0;
31 33
32 protected: 34 protected:
33 virtual ~AwRenderViewHostExtClient() {} 35 virtual ~AwRenderViewHostExtClient() {}
34 }; 36 };
35 37
36 // Provides RenderViewHost wrapper functionality for sending WebView-specific 38 // Provides RenderViewHost wrapper functionality for sending WebView-specific
37 // IPC messages to the renderer and from there to WebKit. 39 // IPC messages to the renderer and from there to WebKit.
38 class AwRenderViewHostExt : public content::WebContentsObserver, 40 class AwRenderViewHostExt : public content::WebContentsObserver,
39 public base::NonThreadSafe { 41 public base::NonThreadSafe {
40 public: 42 public:
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; 87 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
86 virtual void DidNavigateAnyFrame( 88 virtual void DidNavigateAnyFrame(
87 const content::LoadCommittedDetails& details, 89 const content::LoadCommittedDetails& details,
88 const content::FrameNavigateParams& params) OVERRIDE; 90 const content::FrameNavigateParams& params) OVERRIDE;
89 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 91 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
90 92
91 void OnDocumentHasImagesResponse(int msg_id, bool has_images); 93 void OnDocumentHasImagesResponse(int msg_id, bool has_images);
92 void OnUpdateHitTestData(const AwHitTestData& hit_test_data); 94 void OnUpdateHitTestData(const AwHitTestData& hit_test_data);
93 void OnPageScaleFactorChanged(float page_scale_factor); 95 void OnPageScaleFactorChanged(float page_scale_factor);
94 void OnContentsSizeChanged(const gfx::Size& contents_size); 96 void OnContentsSizeChanged(const gfx::Size& contents_size);
97 void OnShouldOverrideUrlLoading(const base::string16& url,
98 bool* ignore_navigation);
95 99
96 bool IsRenderViewReady() const; 100 bool IsRenderViewReady() const;
97 101
98 AwRenderViewHostExtClient* client_; 102 AwRenderViewHostExtClient* client_;
99 103
100 SkColor background_color_; 104 SkColor background_color_;
101 105
102 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_; 106 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_;
103 107
104 // Master copy of hit test data on the browser side. This is updated 108 // Master copy of hit test data on the browser side. This is updated
105 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged 109 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged
106 // is called in AwRenderViewExt. 110 // is called in AwRenderViewExt.
107 AwHitTestData last_hit_test_data_; 111 AwHitTestData last_hit_test_data_;
108 112
109 bool has_new_hit_test_data_; 113 bool has_new_hit_test_data_;
110 114
111 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt); 115 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt);
112 }; 116 };
113 117
114 } // namespace android_webview 118 } // namespace android_webview
115 119
116 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 120 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698