| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // Sets the frame name of the guest. | 82 // Sets the frame name of the guest. |
| 83 void SetName(const std::string& name); | 83 void SetName(const std::string& name); |
| 84 | 84 |
| 85 // Set the zoom factor. | 85 // Set the zoom factor. |
| 86 void SetZoom(double zoom_factor); | 86 void SetZoom(double zoom_factor); |
| 87 | 87 |
| 88 // Set the zoom mode. | 88 // Set the zoom mode. |
| 89 void SetZoomMode(ui_zoom::ZoomController::ZoomMode zoom_mode); | 89 void SetZoomMode(ui_zoom::ZoomController::ZoomMode zoom_mode); |
| 90 | 90 |
| 91 void SetAllowScaling(bool allow); | 91 void SetAllowScaling(bool allow); |
| 92 bool allow_scaling() const { return allow_scaling_; } |
| 92 | 93 |
| 93 // Sets the transparency of the guest. | 94 // Sets the transparency of the guest. |
| 94 void SetAllowTransparency(bool allow); | 95 void SetAllowTransparency(bool allow); |
| 96 bool allow_transparency() const { return allow_transparency_; } |
| 95 | 97 |
| 96 // Loads a data URL with a specified base URL and virtual URL. | 98 // Loads a data URL with a specified base URL and virtual URL. |
| 97 bool LoadDataWithBaseURL(const std::string& data_url, | 99 bool LoadDataWithBaseURL(const std::string& data_url, |
| 98 const std::string& base_url, | 100 const std::string& base_url, |
| 99 const std::string& virtual_url, | 101 const std::string& virtual_url, |
| 100 std::string* error); | 102 std::string* error); |
| 101 | 103 |
| 102 // GuestViewBase implementation. | 104 // GuestViewBase implementation. |
| 103 bool CanRunInDetachedState() const override; | 105 bool CanRunInDetachedState() const override; |
| 104 void CreateWebContents(const base::DictionaryValue& create_params, | 106 void CreateWebContents(const base::DictionaryValue& create_params, |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 359 |
| 358 content::NotificationRegistrar notification_registrar_; | 360 content::NotificationRegistrar notification_registrar_; |
| 359 | 361 |
| 360 // True if the user agent is overridden. | 362 // True if the user agent is overridden. |
| 361 bool is_overriding_user_agent_; | 363 bool is_overriding_user_agent_; |
| 362 | 364 |
| 363 // Stores the window name of the main frame of the guest. | 365 // Stores the window name of the main frame of the guest. |
| 364 std::string name_; | 366 std::string name_; |
| 365 | 367 |
| 366 // Stores whether the contents of the guest can be transparent. | 368 // Stores whether the contents of the guest can be transparent. |
| 367 bool guest_opaque_; | 369 bool allow_transparency_; |
| 368 | 370 |
| 369 // Stores the src URL of the WebView. | 371 // Stores the src URL of the WebView. |
| 370 GURL src_; | 372 GURL src_; |
| 371 | 373 |
| 372 // Handles the JavaScript dialog requests. | 374 // Handles the JavaScript dialog requests. |
| 373 JavaScriptDialogHelper javascript_dialog_helper_; | 375 JavaScriptDialogHelper javascript_dialog_helper_; |
| 374 | 376 |
| 375 // Handles permission requests. | 377 // Handles permission requests. |
| 376 scoped_ptr<WebViewPermissionHelper> web_view_permission_helper_; | 378 scoped_ptr<WebViewPermissionHelper> web_view_permission_helper_; |
| 377 | 379 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 401 // This is used to ensure pending tasks will not fire after this object is | 403 // This is used to ensure pending tasks will not fire after this object is |
| 402 // destroyed. | 404 // destroyed. |
| 403 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 405 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
| 404 | 406 |
| 405 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 407 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
| 406 }; | 408 }; |
| 407 | 409 |
| 408 } // namespace extensions | 410 } // namespace extensions |
| 409 | 411 |
| 410 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 412 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
| OLD | NEW |