| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
| 5 * (http://www.torchmobile.com/) | 5 * (http://www.torchmobile.com/) |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 Member<ChromeClient> chrome_client; | 100 Member<ChromeClient> chrome_client; |
| 101 ContextMenuClient* context_menu_client; | 101 ContextMenuClient* context_menu_client; |
| 102 EditorClient* editor_client; | 102 EditorClient* editor_client; |
| 103 SpellCheckerClient* spell_checker_client; | 103 SpellCheckerClient* spell_checker_client; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 static Page* Create(PageClients& page_clients) { | 106 static Page* Create(PageClients& page_clients) { |
| 107 return new Page(page_clients); | 107 return new Page(page_clients); |
| 108 } | 108 } |
| 109 | 109 |
| 110 // Special value that can be passed as |browsing_instance_id| argument to |
| 111 // CreateOrdinary method. This value designates a page that should not be |
| 112 // related to any other page (example of such a page would be a print-preview |
| 113 // page that adds print header and footer on top of a real page). |
| 114 static const int kUnknownBrowsingInstance = -1; |
| 115 |
| 110 // An "ordinary" page is a fully-featured page owned by a web view. | 116 // An "ordinary" page is a fully-featured page owned by a web view. |
| 111 static Page* CreateOrdinary(PageClients&); | 117 static Page* CreateOrdinary(PageClients&, int browsing_instance_id); |
| 112 | 118 |
| 113 ~Page() override; | 119 ~Page() override; |
| 114 | 120 |
| 115 void CloseSoon(); | 121 void CloseSoon(); |
| 116 bool IsClosing() const { return is_closing_; } | 122 bool IsClosing() const { return is_closing_; } |
| 117 | 123 |
| 118 using PageSet = PersistentHeapHashSet<WeakMember<Page>>; | 124 using PageSet = PersistentHeapHashSet<WeakMember<Page>>; |
| 119 | 125 |
| 120 // Return the current set of full-fledged, ordinary pages. | 126 // Return the current set of full-fledged, ordinary pages. |
| 121 // Each created and owned by a WebView. | 127 // Each created and owned by a WebView. |
| 122 // | 128 // |
| 123 // This set does not include Pages created for other, internal purposes | 129 // This set does not include Pages created for other, internal purposes |
| 124 // (SVGImages, inspector overlays, page popups etc.) | 130 // (SVGImages, inspector overlays, page popups etc.) |
| 125 static PageSet& OrdinaryPages(); | 131 static PageSet& OrdinaryPages(); |
| 126 | 132 |
| 133 // Returns a set of pages related to the current browsing context. See also |
| 134 // https://html.spec.whatwg.org/multipage/browsers.html#unit-of-related-browsi
ng-contexts |
| 135 const PageSet& RelatedPages(); |
| 136 |
| 127 static void PlatformColorsChanged(); | 137 static void PlatformColorsChanged(); |
| 128 | 138 |
| 129 void SetNeedsRecalcStyleInAllFrames(); | 139 void SetNeedsRecalcStyleInAllFrames(); |
| 130 void UpdateAcceleratedCompositingSettings(); | 140 void UpdateAcceleratedCompositingSettings(); |
| 131 | 141 |
| 132 ViewportDescription GetViewportDescription() const; | 142 ViewportDescription GetViewportDescription() const; |
| 133 | 143 |
| 134 static void RefreshPlugins(); | 144 static void RefreshPlugins(); |
| 135 PluginData* GetPluginData(SecurityOrigin* main_frame_origin) const; | 145 PluginData* GetPluginData(SecurityOrigin* main_frame_origin) const; |
| 136 | 146 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 359 |
| 350 PageVisibilityState visibility_state_; | 360 PageVisibilityState visibility_state_; |
| 351 | 361 |
| 352 bool is_cursor_visible_; | 362 bool is_cursor_visible_; |
| 353 | 363 |
| 354 #if DCHECK_IS_ON() | 364 #if DCHECK_IS_ON() |
| 355 bool is_painting_ = false; | 365 bool is_painting_ = false; |
| 356 #endif | 366 #endif |
| 357 | 367 |
| 358 int subframe_count_; | 368 int subframe_count_; |
| 369 |
| 370 int browsing_instance_id_ = kUnknownBrowsingInstance; |
| 359 }; | 371 }; |
| 360 | 372 |
| 361 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; | 373 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; |
| 362 | 374 |
| 363 } // namespace blink | 375 } // namespace blink |
| 364 | 376 |
| 365 #endif // Page_h | 377 #endif // Page_h |
| OLD | NEW |