| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
| 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 void RequestPointerLockPermission( | 167 void RequestPointerLockPermission( |
| 168 bool user_gesture, | 168 bool user_gesture, |
| 169 bool last_unlocked_by_target, | 169 bool last_unlocked_by_target, |
| 170 const base::Callback<void(bool)>& callback) override; | 170 const base::Callback<void(bool)>& callback) override; |
| 171 // NotificationObserver implementation. | 171 // NotificationObserver implementation. |
| 172 void Observe(int type, | 172 void Observe(int type, |
| 173 const content::NotificationSource& source, | 173 const content::NotificationSource& source, |
| 174 const content::NotificationDetails& details) override; | 174 const content::NotificationDetails& details) override; |
| 175 | 175 |
| 176 // Returns the current zoom factor. | 176 // Returns the current zoom factor. |
| 177 double GetZoom(); | 177 double zoom() const { return current_zoom_factor_; } |
| 178 | 178 |
| 179 // Begin or continue a find request. | 179 // Begin or continue a find request. |
| 180 void StartFinding(const base::string16& search_text, | 180 void StartFinding(const base::string16& search_text, |
| 181 const blink::WebFindOptions& options, | 181 const blink::WebFindOptions& options, |
| 182 scoped_refptr<WebViewInternalFindFunction> find_function); | 182 scoped_refptr<WebViewInternalFindFunction> find_function); |
| 183 | 183 |
| 184 // Conclude a find request to clear highlighting. | 184 // Conclude a find request to clear highlighting. |
| 185 void StopFinding(content::StopFindAction); | 185 void StopFinding(content::StopFindAction); |
| 186 | 186 |
| 187 // If possible, navigate the guest to |relative_index| entries away from the | 187 // If possible, navigate the guest to |relative_index| entries away from the |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 bool changed; | 361 bool changed; |
| 362 NewWindowInfo(const GURL& url, const std::string& name) : | 362 NewWindowInfo(const GURL& url, const std::string& name) : |
| 363 url(url), | 363 url(url), |
| 364 name(name), | 364 name(name), |
| 365 changed(false) {} | 365 changed(false) {} |
| 366 }; | 366 }; |
| 367 | 367 |
| 368 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; | 368 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; |
| 369 PendingWindowMap pending_new_windows_; | 369 PendingWindowMap pending_new_windows_; |
| 370 | 370 |
| 371 // Stores the current zoom factor. |
| 372 double current_zoom_factor_; |
| 373 |
| 371 // This is used to ensure pending tasks will not fire after this object is | 374 // This is used to ensure pending tasks will not fire after this object is |
| 372 // destroyed. | 375 // destroyed. |
| 373 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 376 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
| 374 | 377 |
| 375 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 378 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
| 376 }; | 379 }; |
| 377 | 380 |
| 378 } // namespace extensions | 381 } // namespace extensions |
| 379 | 382 |
| 380 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 383 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
| OLD | NEW |