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

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

Issue 2165523004: Force MimeHandlerView to always use BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return Top-Level WebContents View's NativeView rather than Owners Created 4 years, 5 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 static GuestViewBase* From(int owner_process_id, int instance_id); 77 static GuestViewBase* From(int owner_process_id, int instance_id);
78 78
79 // Given a |web_contents|, returns the top level owner WebContents. If 79 // Given a |web_contents|, returns the top level owner WebContents. If
80 // |web_contents| does not belong to a GuestView, it will be returned 80 // |web_contents| does not belong to a GuestView, it will be returned
81 // unchanged. 81 // unchanged.
82 static content::WebContents* GetTopLevelWebContents( 82 static content::WebContents* GetTopLevelWebContents(
83 content::WebContents* web_contents); 83 content::WebContents* web_contents);
84 84
85 static bool IsGuest(content::WebContents* web_contents); 85 static bool IsGuest(content::WebContents* web_contents);
86 86
87 // TODO(ekaramad): This is used in forcing MimeHandlerView always use a
88 // BrowserPlugin rather than <iframe> (OOPIF). Remove this when we fix
89 // https://crbug.com/563285.
90 static bool IsForMimeHandlerViewGuest(content::WebContents* web_contents);
91
87 // Returns the name of the derived type of this GuestView. 92 // Returns the name of the derived type of this GuestView.
88 virtual const char* GetViewType() const = 0; 93 virtual const char* GetViewType() const = 0;
89 94
90 // This method queries whether autosize is supported for this particular view. 95 // This method queries whether autosize is supported for this particular view.
91 // By default, autosize is not supported. Derived classes can override this 96 // By default, autosize is not supported. Derived classes can override this
92 // behavior to support autosize. 97 // behavior to support autosize.
93 virtual bool IsAutoSizeSupported() const; 98 virtual bool IsAutoSizeSupported() const;
94 99
95 // This method queries whether preferred size events are enabled for this 100 // This method queries whether preferred size events are enabled for this
96 // view. By default, preferred size events are disabled, since they add a 101 // view. By default, preferred size events are disabled, since they add a
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 // This is used to ensure pending tasks will not fire after this object is 484 // This is used to ensure pending tasks will not fire after this object is
480 // destroyed. 485 // destroyed.
481 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; 486 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_;
482 487
483 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); 488 DISALLOW_COPY_AND_ASSIGN(GuestViewBase);
484 }; 489 };
485 490
486 } // namespace guest_view 491 } // namespace guest_view
487 492
488 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ 493 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698