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

Side by Side Diff: content/public/browser/web_contents.h

Issue 2882513005: Propagate opener to BackgroundsContents. (Closed)
Patch Set: Tweaked the comment in DriveWebContentsManager::ShouldCreateWebContents Created 3 years, 6 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 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 // Returns true if the location bar should be focused by default rather than 655 // Returns true if the location bar should be focused by default rather than
656 // the page contents. The view calls this function when the tab is focused 656 // the page contents. The view calls this function when the tab is focused
657 // to see what it should do. 657 // to see what it should do.
658 virtual bool FocusLocationBarByDefault() = 0; 658 virtual bool FocusLocationBarByDefault() = 0;
659 659
660 // Does this have an opener (corresponding to window.opener in JavaScript) 660 // Does this have an opener (corresponding to window.opener in JavaScript)
661 // associated with it? 661 // associated with it?
662 virtual bool HasOpener() const = 0; 662 virtual bool HasOpener() const = 0;
663 663
664 // Returns the opener if HasOpener() is true, or nullptr otherwise. 664 // Returns the opener if HasOpener() is true, or nullptr otherwise.
665 virtual WebContents* GetOpener() const = 0; 665 virtual RenderFrameHost* GetOpener() const = 0;
666 666
667 // Returns true if this WebContents was opened by another WebContents, even 667 // Returns true if this WebContents was opened by another WebContents, even
668 // if the opener was suppressed. In contrast to HasOpener/GetOpener, the 668 // if the opener was suppressed. In contrast to HasOpener/GetOpener, the
669 // original opener doesn't reflect window.opener which can be suppressed or 669 // original opener doesn't reflect window.opener which can be suppressed or
670 // updated. 670 // updated.
671 virtual bool HasOriginalOpener() const = 0; 671 virtual bool HasOriginalOpener() const = 0;
672 672
673 // Returns the original opener if HasOriginalOpener() is true, or nullptr 673 // Returns the original opener if HasOriginalOpener() is true, or nullptr
674 // otherwise. 674 // otherwise.
675 virtual WebContents* GetOriginalOpener() const = 0; 675 virtual RenderFrameHost* GetOriginalOpener() const = 0;
676 676
677 typedef base::Callback<void( 677 typedef base::Callback<void(
678 int, /* id */ 678 int, /* id */
679 int, /* HTTP status code */ 679 int, /* HTTP status code */
680 const GURL&, /* image_url */ 680 const GURL&, /* image_url */
681 const std::vector<SkBitmap>&, /* bitmaps */ 681 const std::vector<SkBitmap>&, /* bitmaps */
682 /* The sizes in pixel of the bitmaps before they were resized due to the 682 /* The sizes in pixel of the bitmaps before they were resized due to the
683 max bitmap size passed to DownloadImage(). Each entry in the bitmaps 683 max bitmap size passed to DownloadImage(). Each entry in the bitmaps
684 vector corresponds to an entry in the sizes vector. If a bitmap was 684 vector corresponds to an entry in the sizes vector. If a bitmap was
685 resized, there should be a single returned bitmap. */ 685 resized, there should be a single returned bitmap. */
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 807
808 private: 808 private:
809 // This interface should only be implemented inside content. 809 // This interface should only be implemented inside content.
810 friend class WebContentsImpl; 810 friend class WebContentsImpl;
811 WebContents() {} 811 WebContents() {}
812 }; 812 };
813 813
814 } // namespace content 814 } // namespace content
815 815
816 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 816 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698