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

Side by Side Diff: ios/web/public/web_state/web_state.h

Issue 2799953002: Treat loads of invalid URLs as no-ops unless triggered by window.open. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 public: 54 public:
55 // Parameters for the Create() method. 55 // Parameters for the Create() method.
56 struct CreateParams { 56 struct CreateParams {
57 explicit CreateParams(web::BrowserState* browser_state); 57 explicit CreateParams(web::BrowserState* browser_state);
58 ~CreateParams(); 58 ~CreateParams();
59 59
60 // The corresponding BrowserState for the new WebState. 60 // The corresponding BrowserState for the new WebState.
61 web::BrowserState* browser_state; 61 web::BrowserState* browser_state;
62 62
63 // Whether the WebState is created as the result of a window.open or by 63 // Whether the WebState is created as the result of a window.open or by
64 // clicking a link with a blank targer. Used to determin whether the 64 // clicking a link with a blank target. Used to determine whether the
65 // WebState is allowed to be closed via window.close(). 65 // WebState is allowed to be closed via window.close().
66 bool created_with_opener; 66 bool created_with_opener;
67 }; 67 };
68 68
69 // Parameters for the OpenURL() method. 69 // Parameters for the OpenURL() method.
70 struct OpenURLParams { 70 struct OpenURLParams {
71 OpenURLParams(const GURL& url, 71 OpenURLParams(const GURL& url,
72 const Referrer& referrer, 72 const Referrer& referrer,
73 WindowOpenDisposition disposition, 73 WindowOpenDisposition disposition,
74 ui::PageTransition transition, 74 ui::PageTransition transition,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 // Returns a WeakPtr<WebState> to the current WebState. Must remain private 269 // Returns a WeakPtr<WebState> to the current WebState. Must remain private
270 // and only call must be in WebStateWeakPtrFactory. Please consult that class 270 // and only call must be in WebStateWeakPtrFactory. Please consult that class
271 // for more details. Remove as part of http://crbug.com/556736. 271 // for more details. Remove as part of http://crbug.com/556736.
272 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; 272 virtual base::WeakPtr<WebState> AsWeakPtr() = 0;
273 }; 273 };
274 274
275 } // namespace web 275 } // namespace web
276 276
277 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 277 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698