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

Side by Side Diff: chrome/browser/guestview/webview/webview_guest.h

Issue 239143007: <webview>: Move JavaScript Dialog API to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_pointer_lock_to_chrome
Patch Set: Addressed nits Created 6 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 CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ 5 #ifndef CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
6 #define CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ 6 #define CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "chrome/browser/extensions/tab_helper.h" 9 #include "chrome/browser/extensions/tab_helper.h"
10 #include "chrome/browser/guestview/guestview.h" 10 #include "chrome/browser/guestview/guestview.h"
11 #include "chrome/browser/guestview/webview/javascript_dialog_helper.h"
11 #include "chrome/browser/guestview/webview/webview_find_helper.h" 12 #include "chrome/browser/guestview/webview/webview_find_helper.h"
13 #include "content/public/browser/javascript_dialog_manager.h"
12 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
13 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
14 #include "third_party/WebKit/public/web/WebFindOptions.h" 16 #include "third_party/WebKit/public/web/WebFindOptions.h"
15 17
16 #if defined(OS_CHROMEOS) 18 #if defined(OS_CHROMEOS)
17 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 19 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
18 #endif 20 #endif
19 21
20 namespace extensions { 22 namespace extensions {
21 class ScriptExecutor; 23 class ScriptExecutor;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 virtual void RequestMediaAccessPermission( 86 virtual void RequestMediaAccessPermission(
85 const content::MediaStreamRequest& request, 87 const content::MediaStreamRequest& request,
86 const content::MediaResponseCallback& callback) OVERRIDE; 88 const content::MediaResponseCallback& callback) OVERRIDE;
87 virtual void CanDownload(const std::string& request_method, 89 virtual void CanDownload(const std::string& request_method,
88 const GURL& url, 90 const GURL& url,
89 const base::Callback<void(bool)>& callback) OVERRIDE; 91 const base::Callback<void(bool)>& callback) OVERRIDE;
90 virtual void RequestPointerLockPermission( 92 virtual void RequestPointerLockPermission(
91 bool user_gesture, 93 bool user_gesture,
92 bool last_unlocked_by_target, 94 bool last_unlocked_by_target,
93 const base::Callback<void(bool)>& callback) OVERRIDE; 95 const base::Callback<void(bool)>& callback) OVERRIDE;
96 virtual content::JavaScriptDialogManager*
97 GetJavaScriptDialogManager() OVERRIDE;
94 98
95 // NotificationObserver implementation. 99 // NotificationObserver implementation.
96 virtual void Observe(int type, 100 virtual void Observe(int type,
97 const content::NotificationSource& source, 101 const content::NotificationSource& source,
98 const content::NotificationDetails& details) OVERRIDE; 102 const content::NotificationDetails& details) OVERRIDE;
99 103
100 // Set the zoom factor. 104 // Set the zoom factor.
101 virtual void SetZoom(double zoom_factor) OVERRIDE; 105 virtual void SetZoom(double zoom_factor) OVERRIDE;
102 106
103 // Returns the current zoom factor. 107 // Returns the current zoom factor.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 300
297 // Set to |true| if ChromeVox was already injected in main frame. 301 // Set to |true| if ChromeVox was already injected in main frame.
298 bool chromevox_injected_; 302 bool chromevox_injected_;
299 303
300 // Stores the current zoom factor. 304 // Stores the current zoom factor.
301 double current_zoom_factor_; 305 double current_zoom_factor_;
302 306
303 // Handles find requests and replies for the webview find API. 307 // Handles find requests and replies for the webview find API.
304 WebviewFindHelper find_helper_; 308 WebviewFindHelper find_helper_;
305 309
310 // Handles the JavaScript dialog requests.
311 JavaScriptDialogHelper javascript_dialog_helper_;
312
306 friend void WebviewFindHelper::DispatchFindUpdateEvent(bool canceled, 313 friend void WebviewFindHelper::DispatchFindUpdateEvent(bool canceled,
307 bool final_update); 314 bool final_update);
308 315
309 #if defined(OS_CHROMEOS) 316 #if defined(OS_CHROMEOS)
310 // Subscription to receive notifications on changes to a11y settings. 317 // Subscription to receive notifications on changes to a11y settings.
311 scoped_ptr<chromeos::AccessibilityStatusSubscription> 318 scoped_ptr<chromeos::AccessibilityStatusSubscription>
312 accessibility_subscription_; 319 accessibility_subscription_;
313 #endif 320 #endif
314 321
315 std::map<int, int> bridge_id_to_request_id_map_; 322 std::map<int, int> bridge_id_to_request_id_map_;
316 323
317 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 324 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
318 }; 325 };
319 326
320 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ 327 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/guestview/webview/webview_constants.cc ('k') | chrome/browser/guestview/webview/webview_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698