| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All |
| 3 * Rights Reserved. | 3 * Rights 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 pointer_lock_controller_(PointerLockController::Create(this)), | 109 pointer_lock_controller_(PointerLockController::Create(this)), |
| 110 browser_controls_(BrowserControls::Create(*this)), | 110 browser_controls_(BrowserControls::Create(*this)), |
| 111 console_message_storage_(new ConsoleMessageStorage()), | 111 console_message_storage_(new ConsoleMessageStorage()), |
| 112 event_handler_registry_(new EventHandlerRegistry(*this)), | 112 event_handler_registry_(new EventHandlerRegistry(*this)), |
| 113 global_root_scroller_controller_( | 113 global_root_scroller_controller_( |
| 114 TopDocumentRootScrollerController::Create(*this)), | 114 TopDocumentRootScrollerController::Create(*this)), |
| 115 visual_viewport_(VisualViewport::Create(*this)), | 115 visual_viewport_(VisualViewport::Create(*this)), |
| 116 overscroll_controller_( | 116 overscroll_controller_( |
| 117 OverscrollController::Create(GetVisualViewport(), GetChromeClient())), | 117 OverscrollController::Create(GetVisualViewport(), GetChromeClient())), |
| 118 main_frame_(nullptr), | 118 main_frame_(nullptr), |
| 119 plugin_data_(nullptr), |
| 119 editor_client_(page_clients.editor_client), | 120 editor_client_(page_clients.editor_client), |
| 120 spell_checker_client_(page_clients.spell_checker_client), | 121 spell_checker_client_(page_clients.spell_checker_client), |
| 121 use_counter_(page_clients.chrome_client && | 122 use_counter_(page_clients.chrome_client && |
| 122 page_clients.chrome_client->IsSVGImageChromeClient() | 123 page_clients.chrome_client->IsSVGImageChromeClient() |
| 123 ? UseCounter::kSVGImageContext | 124 ? UseCounter::kSVGImageContext |
| 124 : UseCounter::kDefaultContext), | 125 : UseCounter::kDefaultContext), |
| 125 opened_by_dom_(false), | 126 opened_by_dom_(false), |
| 126 tab_key_cycles_through_elements_(true), | 127 tab_key_cycles_through_elements_(true), |
| 127 suspended_(false), | 128 suspended_(false), |
| 128 device_scale_factor_(1), | 129 device_scale_factor_(1), |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 StyleChangeReasonForTracing::Create(StyleChangeReason::kSettings)); | 284 StyleChangeReasonForTracing::Create(StyleChangeReason::kSettings)); |
| 284 } | 285 } |
| 285 } | 286 } |
| 286 | 287 |
| 287 void Page::RefreshPlugins() { | 288 void Page::RefreshPlugins() { |
| 288 PluginData::RefreshBrowserSidePluginCache(); | 289 PluginData::RefreshBrowserSidePluginCache(); |
| 289 | 290 |
| 290 for (const Page* page : AllPages()) { | 291 for (const Page* page : AllPages()) { |
| 291 // Clear out the page's plugin data. | 292 // Clear out the page's plugin data. |
| 292 if (page->plugin_data_) | 293 if (page->plugin_data_) |
| 293 page->plugin_data_ = nullptr; | 294 page->plugin_data_->ResetPluginData(); |
| 294 } | 295 } |
| 295 } | 296 } |
| 296 | 297 |
| 297 PluginData* Page::GetPluginData(SecurityOrigin* main_frame_origin) const { | 298 PluginData* Page::GetPluginData(SecurityOrigin* main_frame_origin) { |
| 298 if (!plugin_data_ || | 299 if (!plugin_data_) |
| 300 plugin_data_ = PluginData::Create(); |
| 301 |
| 302 if (!plugin_data_->Origin() || |
| 299 !main_frame_origin->IsSameSchemeHostPort(plugin_data_->Origin())) | 303 !main_frame_origin->IsSameSchemeHostPort(plugin_data_->Origin())) |
| 300 plugin_data_ = PluginData::Create(main_frame_origin); | 304 plugin_data_->UpdatePluginList(main_frame_origin); |
| 305 |
| 301 return plugin_data_.Get(); | 306 return plugin_data_.Get(); |
| 302 } | 307 } |
| 303 | 308 |
| 304 void Page::SetValidationMessageClient(ValidationMessageClient* client) { | 309 void Page::SetValidationMessageClient(ValidationMessageClient* client) { |
| 305 validation_message_client_ = client; | 310 validation_message_client_ = client; |
| 306 } | 311 } |
| 307 | 312 |
| 308 void Page::SetSuspended(bool suspended) { | 313 void Page::SetSuspended(bool suspended) { |
| 309 if (suspended == suspended_) | 314 if (suspended == suspended_) |
| 310 return; | 315 return; |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 visitor->Trace(context_menu_controller_); | 626 visitor->Trace(context_menu_controller_); |
| 622 visitor->Trace(pointer_lock_controller_); | 627 visitor->Trace(pointer_lock_controller_); |
| 623 visitor->Trace(scrolling_coordinator_); | 628 visitor->Trace(scrolling_coordinator_); |
| 624 visitor->Trace(browser_controls_); | 629 visitor->Trace(browser_controls_); |
| 625 visitor->Trace(console_message_storage_); | 630 visitor->Trace(console_message_storage_); |
| 626 visitor->Trace(event_handler_registry_); | 631 visitor->Trace(event_handler_registry_); |
| 627 visitor->Trace(global_root_scroller_controller_); | 632 visitor->Trace(global_root_scroller_controller_); |
| 628 visitor->Trace(visual_viewport_); | 633 visitor->Trace(visual_viewport_); |
| 629 visitor->Trace(overscroll_controller_); | 634 visitor->Trace(overscroll_controller_); |
| 630 visitor->Trace(main_frame_); | 635 visitor->Trace(main_frame_); |
| 636 visitor->Trace(plugin_data_); |
| 631 visitor->Trace(validation_message_client_); | 637 visitor->Trace(validation_message_client_); |
| 632 visitor->Trace(use_counter_); | 638 visitor->Trace(use_counter_); |
| 633 Supplementable<Page>::Trace(visitor); | 639 Supplementable<Page>::Trace(visitor); |
| 634 PageVisibilityNotifier::Trace(visitor); | 640 PageVisibilityNotifier::Trace(visitor); |
| 635 } | 641 } |
| 636 | 642 |
| 637 void Page::LayerTreeViewInitialized(WebLayerTreeView& layer_tree_view, | 643 void Page::LayerTreeViewInitialized(WebLayerTreeView& layer_tree_view, |
| 638 FrameView* view) { | 644 FrameView* view) { |
| 639 if (GetScrollingCoordinator()) | 645 if (GetScrollingCoordinator()) |
| 640 GetScrollingCoordinator()->LayerTreeViewInitialized(layer_tree_view, view); | 646 GetScrollingCoordinator()->LayerTreeViewInitialized(layer_tree_view, view); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 : chrome_client(nullptr), | 679 : chrome_client(nullptr), |
| 674 context_menu_client(nullptr), | 680 context_menu_client(nullptr), |
| 675 editor_client(nullptr), | 681 editor_client(nullptr), |
| 676 spell_checker_client(nullptr) {} | 682 spell_checker_client(nullptr) {} |
| 677 | 683 |
| 678 Page::PageClients::~PageClients() {} | 684 Page::PageClients::~PageClients() {} |
| 679 | 685 |
| 680 template class CORE_TEMPLATE_EXPORT Supplement<Page>; | 686 template class CORE_TEMPLATE_EXPORT Supplement<Page>; |
| 681 | 687 |
| 682 } // namespace blink | 688 } // namespace blink |
| OLD | NEW |