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

Side by Side Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 669013002: Remove BackForwardClient, cleanup starting a history navigation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 1 month 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
« no previous file with comments | « Source/core/frame/History.cpp ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "core/inspector/InspectorInstrumentation.h" 76 #include "core/inspector/InspectorInstrumentation.h"
77 #include "core/inspector/InspectorTraceEvents.h" 77 #include "core/inspector/InspectorTraceEvents.h"
78 #include "core/inspector/ScriptCallStack.h" 78 #include "core/inspector/ScriptCallStack.h"
79 #include "core/loader/DocumentLoader.h" 79 #include "core/loader/DocumentLoader.h"
80 #include "core/loader/FrameLoadRequest.h" 80 #include "core/loader/FrameLoadRequest.h"
81 #include "core/loader/FrameLoader.h" 81 #include "core/loader/FrameLoader.h"
82 #include "core/loader/FrameLoaderClient.h" 82 #include "core/loader/FrameLoaderClient.h"
83 #include "core/loader/MixedContentChecker.h" 83 #include "core/loader/MixedContentChecker.h"
84 #include "core/loader/SinkDocument.h" 84 #include "core/loader/SinkDocument.h"
85 #include "core/loader/appcache/ApplicationCache.h" 85 #include "core/loader/appcache/ApplicationCache.h"
86 #include "core/page/BackForwardClient.h"
87 #include "core/page/Chrome.h" 86 #include "core/page/Chrome.h"
88 #include "core/page/ChromeClient.h" 87 #include "core/page/ChromeClient.h"
89 #include "core/page/CreateWindow.h" 88 #include "core/page/CreateWindow.h"
90 #include "core/page/EventHandler.h" 89 #include "core/page/EventHandler.h"
91 #include "core/page/FrameTree.h" 90 #include "core/page/FrameTree.h"
92 #include "core/page/Page.h" 91 #include "core/page/Page.h"
93 #include "core/page/WindowFeatures.h" 92 #include "core/page/WindowFeatures.h"
94 #include "core/page/WindowFocusAllowedIndicator.h" 93 #include "core/page/WindowFocusAllowedIndicator.h"
95 #include "core/page/scrolling/ScrollingCoordinator.h" 94 #include "core/page/scrolling/ScrollingCoordinator.h"
96 #include "core/storage/Storage.h" 95 #include "core/storage/Storage.h"
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 if (!activeDocument) 1006 if (!activeDocument)
1008 return; 1007 return;
1009 1008
1010 if (!activeDocument->canNavigate(*frame())) 1009 if (!activeDocument->canNavigate(*frame()))
1011 return; 1010 return;
1012 } 1011 }
1013 1012
1014 Settings* settings = frame()->settings(); 1013 Settings* settings = frame()->settings();
1015 bool allowScriptsToCloseWindows = settings && settings->allowScriptsToCloseW indows(); 1014 bool allowScriptsToCloseWindows = settings && settings->allowScriptsToCloseW indows();
1016 1015
1017 if (!(page->openedByDOM() || page->backForward().backForwardListCount() <= 1 || allowScriptsToCloseWindows)) { 1016 if (!page->openedByDOM() && frame()->loader().client()->backForwardLength() > 1 && !allowScriptsToCloseWindows) {
1018 frameConsole()->addMessage(ConsoleMessage::create(JSMessageSource, Warni ngMessageLevel, "Scripts may close only the windows that were opened by it.")); 1017 frameConsole()->addMessage(ConsoleMessage::create(JSMessageSource, Warni ngMessageLevel, "Scripts may close only the windows that were opened by it."));
1019 return; 1018 return;
1020 } 1019 }
1021 1020
1022 if (!frame()->loader().shouldClose()) 1021 if (!frame()->loader().shouldClose())
1023 return; 1022 return;
1024 1023
1025 InspectorInstrumentation::willCloseWindow(context); 1024 InspectorInstrumentation::willCloseWindow(context);
1026 1025
1027 page->chrome().closeWindowSoon(); 1026 page->chrome().closeWindowSoon();
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1958 return m_frameObserver->frame(); 1957 return m_frameObserver->frame();
1959 } 1958 }
1960 1959
1961 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate) 1960 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate)
1962 { 1961 {
1963 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. 1962 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8].
1964 return v8::Handle<v8::Object>(); 1963 return v8::Handle<v8::Object>();
1965 } 1964 }
1966 1965
1967 } // namespace blink 1966 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/History.cpp ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698