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

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

Issue 212703005: Preserve Page::openedByDOM state across process swaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tie opened_by_dom with opener. Created 6 years, 8 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 | Annotate | Revision Log
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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 virtual int GetZoomPercent(bool* enable_increment, 270 virtual int GetZoomPercent(bool* enable_increment,
271 bool* enable_decrement) const OVERRIDE; 271 bool* enable_decrement) const OVERRIDE;
272 virtual void ViewSource() OVERRIDE; 272 virtual void ViewSource() OVERRIDE;
273 virtual void ViewFrameSource(const GURL& url, 273 virtual void ViewFrameSource(const GURL& url,
274 const PageState& page_state) OVERRIDE; 274 const PageState& page_state) OVERRIDE;
275 virtual int GetMinimumZoomPercent() const OVERRIDE; 275 virtual int GetMinimumZoomPercent() const OVERRIDE;
276 virtual int GetMaximumZoomPercent() const OVERRIDE; 276 virtual int GetMaximumZoomPercent() const OVERRIDE;
277 virtual gfx::Size GetPreferredSize() const OVERRIDE; 277 virtual gfx::Size GetPreferredSize() const OVERRIDE;
278 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; 278 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE;
279 virtual bool HasOpener() const OVERRIDE; 279 virtual bool HasOpener() const OVERRIDE;
280 virtual bool CreatedWithOpener() const OVERRIDE;
280 virtual void DidChooseColorInColorChooser(SkColor color) OVERRIDE; 281 virtual void DidChooseColorInColorChooser(SkColor color) OVERRIDE;
281 virtual void DidEndColorChooser() OVERRIDE; 282 virtual void DidEndColorChooser() OVERRIDE;
282 virtual int DownloadImage(const GURL& url, 283 virtual int DownloadImage(const GURL& url,
283 bool is_favicon, 284 bool is_favicon,
284 uint32_t max_bitmap_size, 285 uint32_t max_bitmap_size,
285 const ImageDownloadCallback& callback) OVERRIDE; 286 const ImageDownloadCallback& callback) OVERRIDE;
286 virtual bool IsSubframe() const OVERRIDE; 287 virtual bool IsSubframe() const OVERRIDE;
287 virtual void Find(int request_id, 288 virtual void Find(int request_id,
288 const base::string16& search_text, 289 const base::string16& search_text,
289 const blink::WebFindOptions& options) OVERRIDE; 290 const blink::WebFindOptions& options) OVERRIDE;
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 // A list of observers notified when page state changes. Weak references. 869 // A list of observers notified when page state changes. Weak references.
869 // This MUST be listed above frame_tree_ since at destruction time the 870 // This MUST be listed above frame_tree_ since at destruction time the
870 // latter might cause RenderViewHost's destructor to call us and we might use 871 // latter might cause RenderViewHost's destructor to call us and we might use
871 // the observer list then. 872 // the observer list then.
872 ObserverList<WebContentsObserver> observers_; 873 ObserverList<WebContentsObserver> observers_;
873 874
874 // The tab that opened this tab, if any. Will be set to null if the opener 875 // The tab that opened this tab, if any. Will be set to null if the opener
875 // is closed. 876 // is closed.
876 WebContentsImpl* opener_; 877 WebContentsImpl* opener_;
877 878
879 // True if this tab was opened by another tab. Is not unset when opener is
880 // closed.
881 bool created_with_opener_;
882
878 #if defined(OS_WIN) 883 #if defined(OS_WIN)
879 gfx::NativeViewAccessible accessible_parent_; 884 gfx::NativeViewAccessible accessible_parent_;
880 #endif 885 #endif
881 886
882 // Helper classes ------------------------------------------------------------ 887 // Helper classes ------------------------------------------------------------
883 888
884 // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker 889 // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker
885 // pairs. Key is the RenderViewHost, value is the map which maps player_cookie 890 // pairs. Key is the RenderViewHost, value is the map which maps player_cookie
886 // on to PowerSaveBlocker. 891 // on to PowerSaveBlocker.
887 typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> > 892 typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> >
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 // Whether this WebContents is responsible for displaying a subframe in a 1055 // Whether this WebContents is responsible for displaying a subframe in a
1051 // different process from its parent page. 1056 // different process from its parent page.
1052 bool is_subframe_; 1057 bool is_subframe_;
1053 1058
1054 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1059 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1055 }; 1060 };
1056 1061
1057 } // namespace content 1062 } // namespace content
1058 1063
1059 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1064 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698