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

Side by Side Diff: components/guest_view/browser/guest_view_base.h

Issue 2808923003: Revert of Enable find-in-page across GuestViews. (Closed)
Patch Set: Fixed patch conflicts. Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ 5 #ifndef COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_
6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ 6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 10
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // that the clean-up on the browser side is done appropriately. Remove this 215 // that the clean-up on the browser side is done appropriately. Remove this
216 // method when BrowserPlugin is removed (https://crbug.com/535197). 216 // method when BrowserPlugin is removed (https://crbug.com/535197).
217 virtual void OnRenderFrameHostDeleted(int process_id, int routing_id); 217 virtual void OnRenderFrameHostDeleted(int process_id, int routing_id);
218 218
219 // WebContentsDelegate implementation. 219 // WebContentsDelegate implementation.
220 void HandleKeyboardEvent( 220 void HandleKeyboardEvent(
221 content::WebContents* source, 221 content::WebContents* source,
222 const content::NativeWebKeyboardEvent& event) override; 222 const content::NativeWebKeyboardEvent& event) override;
223 bool PreHandleGestureEvent(content::WebContents* source, 223 bool PreHandleGestureEvent(content::WebContents* source,
224 const blink::WebGestureEvent& event) override; 224 const blink::WebGestureEvent& event) override;
225 void FindReply(content::WebContents* source,
226 int request_id,
227 int number_of_matches,
228 const gfx::Rect& selection_rect,
229 int active_match_ordinal,
230 bool final_update) override;
225 231
226 // WebContentsObserver implementation. 232 // WebContentsObserver implementation.
227 void DidFinishNavigation( 233 void DidFinishNavigation(
228 content::NavigationHandle* navigation_handle) override; 234 content::NavigationHandle* navigation_handle) override;
229 235
230 // Given a set of initialization parameters, a concrete subclass of 236 // Given a set of initialization parameters, a concrete subclass of
231 // GuestViewBase can create a specialized WebContents that it returns back to 237 // GuestViewBase can create a specialized WebContents that it returns back to
232 // GuestViewBase. 238 // GuestViewBase.
233 virtual void CreateWebContents( 239 virtual void CreateWebContents(
234 const base::DictionaryValue& create_params, 240 const base::DictionaryValue& create_params,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 289
284 // This method is invoked when the contents preferred size changes. This will 290 // This method is invoked when the contents preferred size changes. This will
285 // only ever fire if IsPreferredSizeSupported returns true. 291 // only ever fire if IsPreferredSizeSupported returns true.
286 virtual void OnPreferredSizeChanged(const gfx::Size& pref_size) {} 292 virtual void OnPreferredSizeChanged(const gfx::Size& pref_size) {}
287 293
288 // Signals that the guest view is ready. The default implementation signals 294 // Signals that the guest view is ready. The default implementation signals
289 // immediately, but derived class can override this if they need to do 295 // immediately, but derived class can override this if they need to do
290 // asynchronous setup. 296 // asynchronous setup.
291 virtual void SignalWhenReady(const base::Closure& callback); 297 virtual void SignalWhenReady(const base::Closure& callback);
292 298
299 // Returns true if this guest should handle find requests for its
300 // embedder. This should generally be true for guests that make up the
301 // entirety of the embedder's content.
302 virtual bool ShouldHandleFindRequestsForEmbedder() const;
303
293 // This method is called immediately before suspended resource loads have been 304 // This method is called immediately before suspended resource loads have been
294 // resumed on attachment to an embedder. 305 // resumed on attachment to an embedder.
295 // 306 //
296 // This method can be overriden by subclasses. This gives the derived class 307 // This method can be overriden by subclasses. This gives the derived class
297 // an opportunity to perform setup actions before attachment. 308 // an opportunity to perform setup actions before attachment.
298 virtual void WillAttachToEmbedder() {} 309 virtual void WillAttachToEmbedder() {}
299 310
300 // This method is called when the guest WebContents is about to be destroyed. 311 // This method is called when the guest WebContents is about to be destroyed.
301 // 312 //
302 // This gives the derived class an opportunity to perform some cleanup prior 313 // This gives the derived class an opportunity to perform some cleanup prior
(...skipping 24 matching lines...) Expand all
327 338
328 class OwnerContentsObserver; 339 class OwnerContentsObserver;
329 class OpenerLifetimeObserver; 340 class OpenerLifetimeObserver;
330 341
331 // BrowserPluginGuestDelegate implementation. 342 // BrowserPluginGuestDelegate implementation.
332 content::WebContents* CreateNewGuestWindow( 343 content::WebContents* CreateNewGuestWindow(
333 const content::WebContents::CreateParams& create_params) final; 344 const content::WebContents::CreateParams& create_params) final;
334 void DidAttach(int guest_proxy_routing_id) final; 345 void DidAttach(int guest_proxy_routing_id) final;
335 void DidDetach() final; 346 void DidDetach() final;
336 content::WebContents* GetOwnerWebContents() const final; 347 content::WebContents* GetOwnerWebContents() const final;
348 bool HandleFindForEmbedder(int request_id,
349 const base::string16& search_text,
350 const blink::WebFindOptions& options) final;
351 bool HandleStopFindingForEmbedder(content::StopFindAction action) final;
337 void GuestSizeChanged(const gfx::Size& new_size) final; 352 void GuestSizeChanged(const gfx::Size& new_size) final;
338 void SetGuestHost(content::GuestHost* guest_host) final; 353 void SetGuestHost(content::GuestHost* guest_host) final;
339 void WillAttach(content::WebContents* embedder_web_contents, 354 void WillAttach(content::WebContents* embedder_web_contents,
340 int browser_plugin_instance_id, 355 int browser_plugin_instance_id,
341 bool is_full_page_plugin, 356 bool is_full_page_plugin,
342 const base::Closure& callback) final; 357 const base::Closure& callback) final;
343 358
344 // WebContentsDelegate implementation. 359 // WebContentsDelegate implementation.
345 void ActivateContents(content::WebContents* contents) final; 360 void ActivateContents(content::WebContents* contents) final;
346 void ContentsMouseEvent(content::WebContents* source, 361 void ContentsMouseEvent(content::WebContents* source,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 // This is used to ensure pending tasks will not fire after this object is 487 // This is used to ensure pending tasks will not fire after this object is
473 // destroyed. 488 // destroyed.
474 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; 489 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_;
475 490
476 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); 491 DISALLOW_COPY_AND_ASSIGN(GuestViewBase);
477 }; 492 };
478 493
479 } // namespace guest_view 494 } // namespace guest_view
480 495
481 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ 496 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/platform_apps/web_view/shim/main.js ('k') | components/guest_view/browser/guest_view_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698