OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
5 * (http://www.torchmobile.com/) | 5 * (http://www.torchmobile.com/) |
6 * Copyright (C) 2009 Adam Barth. All rights reserved. | 6 * Copyright (C) 2009 Adam Barth. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "core/loader/FormSubmission.h" | 45 #include "core/loader/FormSubmission.h" |
46 #include "core/loader/FrameLoadRequest.h" | 46 #include "core/loader/FrameLoadRequest.h" |
47 #include "core/loader/FrameLoader.h" | 47 #include "core/loader/FrameLoader.h" |
48 #include "core/loader/FrameLoaderStateMachine.h" | 48 #include "core/loader/FrameLoaderStateMachine.h" |
49 #include "core/page/Page.h" | 49 #include "core/page/Page.h" |
50 #include "core/probe/CoreProbes.h" | 50 #include "core/probe/CoreProbes.h" |
51 #include "platform/Histogram.h" | 51 #include "platform/Histogram.h" |
52 #include "platform/SharedBuffer.h" | 52 #include "platform/SharedBuffer.h" |
53 #include "platform/UserGestureIndicator.h" | 53 #include "platform/UserGestureIndicator.h" |
54 #include "platform/loader/fetch/ResourceLoaderOptions.h" | 54 #include "platform/loader/fetch/ResourceLoaderOptions.h" |
| 55 #include "platform/scheduler/child/web_scheduler.h" |
55 #include "platform/wtf/CurrentTime.h" | 56 #include "platform/wtf/CurrentTime.h" |
56 #include "platform/wtf/PtrUtil.h" | 57 #include "platform/wtf/PtrUtil.h" |
57 #include "public/platform/Platform.h" | 58 #include "public/platform/Platform.h" |
58 #include "public/platform/WebCachePolicy.h" | 59 #include "public/platform/WebCachePolicy.h" |
59 #include "public/platform/WebScheduler.h" | |
60 | 60 |
61 namespace blink { | 61 namespace blink { |
62 | 62 |
63 namespace { | 63 namespace { |
64 | 64 |
65 // Add new scheduled navigation types before ScheduledLastEntry | 65 // Add new scheduled navigation types before ScheduledLastEntry |
66 enum ScheduledNavigationType { | 66 enum ScheduledNavigationType { |
67 kScheduledReload, | 67 kScheduledReload, |
68 kScheduledFormSubmission, | 68 kScheduledFormSubmission, |
69 kScheduledURLNavigation, | 69 kScheduledURLNavigation, |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 : ScheduledNavigation(0, document, replaces_current_item, true), | 332 : ScheduledNavigation(0, document, replaces_current_item, true), |
333 submission_(submission) { | 333 submission_(submission) { |
334 DCHECK(submission_->Form()); | 334 DCHECK(submission_->Form()); |
335 } | 335 } |
336 | 336 |
337 Member<FormSubmission> submission_; | 337 Member<FormSubmission> submission_; |
338 }; | 338 }; |
339 | 339 |
340 NavigationScheduler::NavigationScheduler(LocalFrame* frame) | 340 NavigationScheduler::NavigationScheduler(LocalFrame* frame) |
341 : frame_(frame), | 341 : frame_(frame), |
342 frame_type_(frame_->IsMainFrame() | 342 frame_type_( |
343 ? WebScheduler::NavigatingFrameType::kMainFrame | 343 frame_->IsMainFrame() |
344 : WebScheduler::NavigatingFrameType::kChildFrame) {} | 344 ? scheduler::RendererScheduler::NavigatingFrameType::kMainFrame |
| 345 : scheduler::RendererScheduler::NavigatingFrameType:: |
| 346 kChildFrame) {} |
345 | 347 |
346 NavigationScheduler::~NavigationScheduler() { | 348 NavigationScheduler::~NavigationScheduler() { |
347 if (navigate_task_handle_.IsActive()) { | 349 if (navigate_task_handle_.IsActive()) { |
348 Platform::Current()->CurrentThread()->Scheduler()->RemovePendingNavigation( | 350 Platform::Current()->CurrentThread()->Scheduler()->RemovePendingNavigation( |
349 frame_type_); | 351 frame_type_); |
350 } | 352 } |
351 } | 353 } |
352 | 354 |
353 bool NavigationScheduler::LocationChangePending() { | 355 bool NavigationScheduler::LocationChangePending() { |
354 return redirect_ && redirect_->IsLocationChange(); | 356 return redirect_ && redirect_->IsLocationChange(); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 navigate_task_handle_.Cancel(); | 546 navigate_task_handle_.Cancel(); |
545 redirect_.Clear(); | 547 redirect_.Clear(); |
546 } | 548 } |
547 | 549 |
548 DEFINE_TRACE(NavigationScheduler) { | 550 DEFINE_TRACE(NavigationScheduler) { |
549 visitor->Trace(frame_); | 551 visitor->Trace(frame_); |
550 visitor->Trace(redirect_); | 552 visitor->Trace(redirect_); |
551 } | 553 } |
552 | 554 |
553 } // namespace blink | 555 } // namespace blink |
OLD | NEW |