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

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: typo 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 (corresponding to window.opener in JavaScript)
636 // associated with it?
636 virtual bool HasOpener() const = 0; 637 virtual bool HasOpener() const = 0;
637 638
638 // Returns the opener if HasOpener() is true, or nullptr otherwise. 639 // Returns the opener if HasOpener() is true, or nullptr otherwise.
639 virtual WebContents* GetOpener() const = 0; 640 virtual WebContents* GetOpener() const = 0;
640 641
642 // Returns true if this WebContents was opened by another WebContents, even
643 // if the opener was suppressed. In contrast to HasOpener/GetOpener, the
644 // original opener doesn't reflect window.opener which can be suppressed or
645 // updated.
646 virtual bool HasOriginalOpener() const = 0;
647
648 // Returns the original opener if HasOriginalOpener() is true, or nullptr
649 // otherwise.
650 virtual WebContents* GetOriginalOpener() const = 0;
651
641 typedef base::Callback<void( 652 typedef base::Callback<void(
642 int, /* id */ 653 int, /* id */
643 int, /* HTTP status code */ 654 int, /* HTTP status code */
644 const GURL&, /* image_url */ 655 const GURL&, /* image_url */
645 const std::vector<SkBitmap>&, /* bitmaps */ 656 const std::vector<SkBitmap>&, /* bitmaps */
646 /* The sizes in pixel of the bitmaps before they were resized due to the 657 /* 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 658 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 659 vector corresponds to an entry in the sizes vector. If a bitmap was
649 resized, there should be a single returned bitmap. */ 660 resized, there should be a single returned bitmap. */
650 const std::vector<gfx::Size>&)> 661 const std::vector<gfx::Size>&)>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 782
772 private: 783 private:
773 // This interface should only be implemented inside content. 784 // This interface should only be implemented inside content.
774 friend class WebContentsImpl; 785 friend class WebContentsImpl;
775 WebContents() {} 786 WebContents() {}
776 }; 787 };
777 788
778 } // namespace content 789 } // namespace content
779 790
780 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 791 #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