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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 597753003: Implement find in page support for top level BrowserPlugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 // A BrowserPluginGuest is the browser side of a browser <--> embedder 5 // A BrowserPluginGuest is the browser side of a browser <--> embedder
6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder 6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder
7 // renderer side of browser <--> embedder renderer communication. 7 // renderer side of browser <--> embedder renderer communication.
8 // 8 //
9 // BrowserPluginGuest lives on the UI thread of the browser process. Any 9 // BrowserPluginGuest lives on the UI thread of the browser process. Any
10 // messages about the guest render process that the embedder might be interested 10 // messages about the guest render process that the embedder might be interested
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 void PointerLockPermissionResponse(bool allow); 199 void PointerLockPermissionResponse(bool allow);
200 200
201 void SwapCompositorFrame(uint32 output_surface_id, 201 void SwapCompositorFrame(uint32 output_surface_id,
202 int host_process_id, 202 int host_process_id,
203 int host_routing_id, 203 int host_routing_id,
204 scoped_ptr<cc::CompositorFrame> frame); 204 scoped_ptr<cc::CompositorFrame> frame);
205 205
206 void SetContentsOpaque(bool opaque); 206 void SetContentsOpaque(bool opaque);
207 207
208 // Find the given |search_text| in the page. Returns true if the find request
209 // is handled by this browser plugin guest.
210 bool Find(int request_id,
211 const base::string16& search_text,
212 const blink::WebFindOptions& options);
213
208 private: 214 private:
209 class EmbedderWebContentsObserver; 215 class EmbedderWebContentsObserver;
210 216
211 // BrowserPluginGuest is a WebContentsObserver of |web_contents| and 217 // BrowserPluginGuest is a WebContentsObserver of |web_contents| and
212 // |web_contents| has to stay valid for the lifetime of BrowserPluginGuest. 218 // |web_contents| has to stay valid for the lifetime of BrowserPluginGuest.
213 BrowserPluginGuest(bool has_render_view, 219 BrowserPluginGuest(bool has_render_view,
214 WebContentsImpl* web_contents, 220 WebContentsImpl* web_contents,
215 BrowserPluginGuestDelegate* delegate); 221 BrowserPluginGuestDelegate* delegate);
216 222
217 void WillDestroy(); 223 void WillDestroy();
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 337
332 // An identifier that uniquely identifies a browser plugin within an embedder. 338 // An identifier that uniquely identifies a browser plugin within an embedder.
333 int browser_plugin_instance_id_; 339 int browser_plugin_instance_id_;
334 float guest_device_scale_factor_; 340 float guest_device_scale_factor_;
335 gfx::Rect guest_window_rect_; 341 gfx::Rect guest_window_rect_;
336 bool focused_; 342 bool focused_;
337 bool mouse_locked_; 343 bool mouse_locked_;
338 bool pending_lock_request_; 344 bool pending_lock_request_;
339 bool guest_visible_; 345 bool guest_visible_;
340 bool embedder_visible_; 346 bool embedder_visible_;
347 // Whether the browser plugin is inside a plugin document.
348 bool is_full_page_plugin_;
341 349
342 // Each copy-request is identified by a unique number. The unique number is 350 // Each copy-request is identified by a unique number. The unique number is
343 // used to keep track of the right callback. 351 // used to keep track of the right callback.
344 int copy_request_id_; 352 int copy_request_id_;
345 typedef base::Callback<void(bool, const SkBitmap&)> CopyRequestCallback; 353 typedef base::Callback<void(bool, const SkBitmap&)> CopyRequestCallback;
346 typedef std::map<int, const CopyRequestCallback> CopyRequestMap; 354 typedef std::map<int, const CopyRequestCallback> CopyRequestMap;
347 CopyRequestMap copy_request_callbacks_; 355 CopyRequestMap copy_request_callbacks_;
348 356
349 // Indicates that this BrowserPluginGuest has associated renderer-side state. 357 // Indicates that this BrowserPluginGuest has associated renderer-side state.
350 // This is used to determine whether or not to create a new RenderView when 358 // This is used to determine whether or not to create a new RenderView when
(...skipping 23 matching lines...) Expand all
374 // Weak pointer used to ask GeolocationPermissionContext about geolocation 382 // Weak pointer used to ask GeolocationPermissionContext about geolocation
375 // permission. 383 // permission.
376 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; 384 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
377 385
378 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 386 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
379 }; 387 };
380 388
381 } // namespace content 389 } // namespace content
382 390
383 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 391 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698