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

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

Issue 2074733002: Add public API for handling Javascript alerts and prompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 5 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_WEB_STATE_WEB_STATE_IMPL_H_ 5 #ifndef IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ 6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "ios/web/navigation/navigation_manager_delegate.h" 20 #include "ios/web/navigation/navigation_manager_delegate.h"
21 #include "ios/web/navigation/navigation_manager_impl.h" 21 #include "ios/web/navigation/navigation_manager_impl.h"
22 #include "ios/web/net/request_tracker_impl.h" 22 #include "ios/web/net/request_tracker_impl.h"
23 #include "ios/web/public/javascript_dialog_callback.h"
24 #include "ios/web/public/javascript_dialog_type.h"
23 #include "ios/web/public/web_state/web_state.h" 25 #include "ios/web/public/web_state/web_state.h"
24 #include "url/gurl.h" 26 #include "url/gurl.h"
25 27
26 @protocol CRWRequestTrackerDelegate; 28 @protocol CRWRequestTrackerDelegate;
27 @class CRWWebController; 29 @class CRWWebController;
28 @protocol CRWWebViewProxy; 30 @protocol CRWWebViewProxy;
29 @class NSURLRequest; 31 @class NSURLRequest;
30 @class NSURLResponse; 32 @class NSURLResponse;
31 33
32 namespace net { 34 namespace net {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 void ShowWebInterstitial(WebInterstitialImpl* interstitial); 262 void ShowWebInterstitial(WebInterstitialImpl* interstitial);
261 263
262 // Called to dismiss the currently-displayed transient content view. 264 // Called to dismiss the currently-displayed transient content view.
263 void ClearTransientContentView(); 265 void ClearTransientContentView();
264 266
265 // Notifies the delegate that the load progress was updated. 267 // Notifies the delegate that the load progress was updated.
266 void SendChangeLoadProgress(double progress); 268 void SendChangeLoadProgress(double progress);
267 // Notifies the delegate that a context menu needs handling. 269 // Notifies the delegate that a context menu needs handling.
268 bool HandleContextMenu(const ContextMenuParams& params); 270 bool HandleContextMenu(const ContextMenuParams& params);
269 271
272 // Notifies the delegate that a Javascript dialog needs to be presented.
Eugene But (OOO till 7-30) 2016/06/27 21:09:37 NIT: s/Javascript/JavaScript
michaeldo 2016/06/27 22:25:10 Done.
273 void RunJavaScriptDialog(const GURL& origin,
274 JavaScriptDialogType javascript_dialog_type,
Eugene But (OOO till 7-30) 2016/06/27 21:09:37 NIT: s/javascript_dialog_type/java_script_dialog_t
michaeldo 2016/06/27 22:25:10 Done.
275 NSString* message_text,
276 NSString* default_prompt_text,
277 const DialogClosedCallback& callback);
278
279 // Cancels the display of any currently displayed dialog and any queued
Eugene But (OOO till 7-30) 2016/06/27 21:09:37 Please do not make assumptions that dialogs are qu
michaeldo 2016/06/27 22:25:10 Done.
280 // dialogs.
281 void CancelActiveAndPendingDialogs();
282
270 // NavigationManagerDelegate: 283 // NavigationManagerDelegate:
271 void NavigateToPendingEntry() override; 284 void NavigateToPendingEntry() override;
272 void LoadURLWithParams(const NavigationManager::WebLoadParams&) override; 285 void LoadURLWithParams(const NavigationManager::WebLoadParams&) override;
273 void OnNavigationItemsPruned(size_t pruned_item_count) override; 286 void OnNavigationItemsPruned(size_t pruned_item_count) override;
274 void OnNavigationItemChanged() override; 287 void OnNavigationItemChanged() override;
275 void OnNavigationItemCommitted( 288 void OnNavigationItemCommitted(
276 const LoadCommittedDetails& load_details) override; 289 const LoadCommittedDetails& load_details) override;
277 WebState* GetWebState() override; 290 WebState* GetWebState() override;
278 291
279 protected: 292 protected:
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 372
360 // Mojo interface registry for this WebState. 373 // Mojo interface registry for this WebState.
361 std::unique_ptr<shell::InterfaceRegistry> mojo_interface_registry_; 374 std::unique_ptr<shell::InterfaceRegistry> mojo_interface_registry_;
362 375
363 DISALLOW_COPY_AND_ASSIGN(WebStateImpl); 376 DISALLOW_COPY_AND_ASSIGN(WebStateImpl);
364 }; 377 };
365 378
366 } // namespace web 379 } // namespace web
367 380
368 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ 381 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698