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

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

Issue 1293963002: Fixing the Position of Context Menu for BrowserPlugin (<webview>) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a Build Error in MAC Created 5 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 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 <queue> 8 #include <queue>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // This value is only valid after attachment or first navigation. 264 // This value is only valid after attachment or first navigation.
265 int proxy_routing_id() const { return guest_proxy_routing_id_; } 265 int proxy_routing_id() const { return guest_proxy_routing_id_; }
266 266
267 // Destroy this guest. 267 // Destroy this guest.
268 void Destroy(); 268 void Destroy();
269 269
270 // Saves the attach state of the custom element hosting this GuestView. 270 // Saves the attach state of the custom element hosting this GuestView.
271 void SetAttachParams(const base::DictionaryValue& params); 271 void SetAttachParams(const base::DictionaryValue& params);
272 void SetOpener(GuestViewBase* opener); 272 void SetOpener(GuestViewBase* opener);
273 273
274 // BrowserPluginGuestDelegate implementation.
275 content::WebContents* CreateNewGuestWindow( 274 content::WebContents* CreateNewGuestWindow(
276 const content::WebContents::CreateParams& create_params) final; 275 const content::WebContents::CreateParams& create_params) final;
277 void DidAttach(int guest_proxy_routing_id) final; 276 void DidAttach(int guest_proxy_routing_id) final;
278 void DidDetach() final; 277 void DidDetach() final;
279 content::WebContents* GetOwnerWebContents() const final; 278 content::WebContents* GetOwnerWebContents() const final;
280 bool Find(int request_id, 279 bool Find(int request_id,
281 const base::string16& search_text, 280 const base::string16& search_text,
282 const blink::WebFindOptions& options) final; 281 const blink::WebFindOptions& options) final;
283 bool StopFinding(content::StopFindAction action) final; 282 bool StopFinding(content::StopFindAction action) final;
284 void GuestSizeChanged(const gfx::Size& new_size) final; 283 void GuestSizeChanged(const gfx::Size& new_size) final;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 // Signals that the guest view is ready. The default implementation signals 361 // Signals that the guest view is ready. The default implementation signals
363 // immediately, but derived class can override this if they need to do 362 // immediately, but derived class can override this if they need to do
364 // asynchronous setup. 363 // asynchronous setup.
365 virtual void SignalWhenReady(const base::Closure& callback); 364 virtual void SignalWhenReady(const base::Closure& callback);
366 365
367 // Returns true if this guest should handle find requests for its 366 // Returns true if this guest should handle find requests for its
368 // embedder. This should generally be true for guests that make up the 367 // embedder. This should generally be true for guests that make up the
369 // entirety of the embedder's content. 368 // entirety of the embedder's content.
370 virtual bool ShouldHandleFindRequestsForEmbedder() const; 369 virtual bool ShouldHandleFindRequestsForEmbedder() const;
371 370
371 // BrowserPluginGuestDelegate implementation.
372 void SetContextMenuPosition(const gfx::Point& position) override;
373
372 private: 374 private:
373 class OwnerContentsObserver; 375 class OwnerContentsObserver;
374 376
375 class OpenerLifetimeObserver; 377 class OpenerLifetimeObserver;
376 378
377 void SendQueuedEvents(); 379 void SendQueuedEvents();
378 380
379 void CompleteInit(scoped_ptr<base::DictionaryValue> create_params, 381 void CompleteInit(scoped_ptr<base::DictionaryValue> create_params,
380 const WebContentsCreatedCallback& callback, 382 const WebContentsCreatedCallback& callback,
381 content::WebContents* guest_web_contents); 383 content::WebContents* guest_web_contents);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // This is used to ensure pending tasks will not fire after this object is 472 // This is used to ensure pending tasks will not fire after this object is
471 // destroyed. 473 // destroyed.
472 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; 474 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_;
473 475
474 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); 476 DISALLOW_COPY_AND_ASSIGN(GuestViewBase);
475 }; 477 };
476 478
477 } // namespace guest_view 479 } // namespace guest_view
478 480
479 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ 481 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698