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

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

Issue 13712002: Fix Guest geolocation API, we were using |bridge_id| and |request_id| interchangeably which is wron… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 7 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 | Annotate | Revision Log
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. It has a 9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a
10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The 10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // Weak pointer used to ask GeolocationPermissionContext about geolocation 397 // Weak pointer used to ask GeolocationPermissionContext about geolocation
398 // permission. 398 // permission.
399 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; 399 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
400 400
401 // Static factory instance (always NULL for non-test). 401 // Static factory instance (always NULL for non-test).
402 static BrowserPluginHostFactory* factory_; 402 static BrowserPluginHostFactory* factory_;
403 403
404 NotificationRegistrar notification_registrar_; 404 NotificationRegistrar notification_registrar_;
405 scoped_ptr<EmbedderRenderViewHostObserver> embedder_rvh_observer_; 405 scoped_ptr<EmbedderRenderViewHostObserver> embedder_rvh_observer_;
406 WebContentsImpl* embedder_web_contents_; 406 WebContentsImpl* embedder_web_contents_;
407 typedef std::map<int, GeolocationCallback> GeolocationRequestsMap; 407
408 GeolocationRequestsMap geolocation_request_callback_map_; 408 // GeolocationRequestItem contains callback and bridge id for a request.
409 typedef std::pair<GeolocationCallback, int> GeolocationRequestItem;
410 typedef std::map<int, GeolocationRequestItem> GeolocationRequestsMap;
411 GeolocationRequestsMap geolocation_request_map_;
412 std::map<int, int> bridge_id_to_request_id_map_;
413
409 // An identifier that uniquely identifies a browser plugin guest within an 414 // An identifier that uniquely identifies a browser plugin guest within an
410 // embedder. 415 // embedder.
411 int instance_id_; 416 int instance_id_;
412 scoped_ptr<base::SharedMemory> damage_buffer_; 417 scoped_ptr<base::SharedMemory> damage_buffer_;
413 // An identifier that uniquely identifies a damage buffer. 418 // An identifier that uniquely identifies a damage buffer.
414 uint32 damage_buffer_sequence_id_; 419 uint32 damage_buffer_sequence_id_;
415 size_t damage_buffer_size_; 420 size_t damage_buffer_size_;
416 gfx::Size damage_view_size_; 421 gfx::Size damage_view_size_;
417 float damage_buffer_scale_factor_; 422 float damage_buffer_scale_factor_;
418 gfx::Rect guest_window_rect_; 423 gfx::Rect guest_window_rect_;
(...skipping 26 matching lines...) Expand all
445 450
446 typedef std::map<int, base::Callback<void(bool)> > DownloadRequestMap; 451 typedef std::map<int, base::Callback<void(bool)> > DownloadRequestMap;
447 DownloadRequestMap download_request_callback_map_; 452 DownloadRequestMap download_request_callback_map_;
448 453
449 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 454 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
450 }; 455 };
451 456
452 } // namespace content 457 } // namespace content
453 458
454 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 459 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698