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

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

Issue 2661403003: Track the original opener of a webcontents so we can rely on it for popups (Closed)
Patch Set: updates Created 3 years, 10 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 virtual void DidChooseColorInColorChooser(SkColor color) = 0; 625 virtual void DidChooseColorInColorChooser(SkColor color) = 0;
626 626
627 // Called when the color chooser has ended. 627 // Called when the color chooser has ended.
628 virtual void DidEndColorChooser() = 0; 628 virtual void DidEndColorChooser() = 0;
629 629
630 // Returns true if the location bar should be focused by default rather than 630 // Returns true if the location bar should be focused by default rather than
631 // the page contents. The view calls this function when the tab is focused 631 // the page contents. The view calls this function when the tab is focused
632 // to see what it should do. 632 // to see what it should do.
633 virtual bool FocusLocationBarByDefault() = 0; 633 virtual bool FocusLocationBarByDefault() = 0;
634 634
635 // Does this have an opener associated with it? 635 // Does this have an opener associated with it?
Avi (use Gerrit) 2017/02/03 19:26:33 You might want to note that this is the "opener" i
636 virtual bool HasOpener() const = 0; 636 virtual bool HasOpener() const = 0;
637 637
638 // Returns the opener if HasOpener() is true, or nullptr otherwise. 638 // Returns the opener if HasOpener() is true, or nullptr otherwise.
639 virtual WebContents* GetOpener() const = 0; 639 virtual WebContents* GetOpener() const = 0;
640 640
641 // Returns true if this WebContents was opened by another WebContents, even
642 // if the opener was suppressed.
Avi (use Gerrit) 2017/02/03 19:26:33 ... even if the JavaScript opener was suppressed..
643 virtual bool HasOriginalOpener() const = 0;
644
645 // Returns the original opener if HasOriginalOpener() is true, or nullptr
646 // otherwise.
647 virtual WebContents* GetOriginalOpener() const = 0;
648
641 typedef base::Callback<void( 649 typedef base::Callback<void(
642 int, /* id */ 650 int, /* id */
643 int, /* HTTP status code */ 651 int, /* HTTP status code */
644 const GURL&, /* image_url */ 652 const GURL&, /* image_url */
645 const std::vector<SkBitmap>&, /* bitmaps */ 653 const std::vector<SkBitmap>&, /* bitmaps */
646 /* The sizes in pixel of the bitmaps before they were resized due to the 654 /* The sizes in pixel of the bitmaps before they were resized due to the
647 max bitmap size passed to DownloadImage(). Each entry in the bitmaps 655 max bitmap size passed to DownloadImage(). Each entry in the bitmaps
648 vector corresponds to an entry in the sizes vector. If a bitmap was 656 vector corresponds to an entry in the sizes vector. If a bitmap was
649 resized, there should be a single returned bitmap. */ 657 resized, there should be a single returned bitmap. */
650 const std::vector<gfx::Size>&)> 658 const std::vector<gfx::Size>&)>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 779
772 private: 780 private:
773 // This interface should only be implemented inside content. 781 // This interface should only be implemented inside content.
774 friend class WebContentsImpl; 782 friend class WebContentsImpl;
775 WebContents() {} 783 WebContents() {}
776 }; 784 };
777 785
778 } // namespace content 786 } // namespace content
779 787
780 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 788 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698