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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // Returns the stored rules registry ID of the given webview. Will generate | 74 // Returns the stored rules registry ID of the given webview. Will generate |
75 // an ID for the first query. | 75 // an ID for the first query. |
76 static int GetOrGenerateRulesRegistryID( | 76 static int GetOrGenerateRulesRegistryID( |
77 int embedder_process_id, | 77 int embedder_process_id, |
78 int web_view_instance_id); | 78 int web_view_instance_id); |
79 | 79 |
80 // Get the current zoom. | 80 // Get the current zoom. |
81 double GetZoom() const; | 81 double GetZoom() const; |
82 | 82 |
83 // Get the current zoom mode. | 83 // Get the current zoom mode. |
84 ui_zoom::ZoomController::ZoomMode GetZoomMode(); | 84 zoom::ZoomController::ZoomMode GetZoomMode(); |
85 | 85 |
86 // Request navigating the guest to the provided |src| URL. | 86 // Request navigating the guest to the provided |src| URL. |
87 void NavigateGuest(const std::string& src, bool force_navigation); | 87 void NavigateGuest(const std::string& src, bool force_navigation); |
88 | 88 |
89 // Shows the context menu for the guest. | 89 // Shows the context menu for the guest. |
90 void ShowContextMenu(int request_id); | 90 void ShowContextMenu(int request_id); |
91 | 91 |
92 // Sets the frame name of the guest. | 92 // Sets the frame name of the guest. |
93 void SetName(const std::string& name); | 93 void SetName(const std::string& name); |
94 const std::string& name() { return name_; } | 94 const std::string& name() { return name_; } |
95 | 95 |
96 // Set the zoom factor. | 96 // Set the zoom factor. |
97 void SetZoom(double zoom_factor); | 97 void SetZoom(double zoom_factor); |
98 | 98 |
99 // Set the zoom mode. | 99 // Set the zoom mode. |
100 void SetZoomMode(ui_zoom::ZoomController::ZoomMode zoom_mode); | 100 void SetZoomMode(zoom::ZoomController::ZoomMode zoom_mode); |
101 | 101 |
102 void SetAllowScaling(bool allow); | 102 void SetAllowScaling(bool allow); |
103 bool allow_scaling() const { return allow_scaling_; } | 103 bool allow_scaling() const { return allow_scaling_; } |
104 | 104 |
105 // Sets the transparency of the guest. | 105 // Sets the transparency of the guest. |
106 void SetAllowTransparency(bool allow); | 106 void SetAllowTransparency(bool allow); |
107 bool allow_transparency() const { return allow_transparency_; } | 107 bool allow_transparency() const { return allow_transparency_; } |
108 | 108 |
109 // Loads a data URL with a specified base URL and virtual URL. | 109 // Loads a data URL with a specified base URL and virtual URL. |
110 bool LoadDataWithBaseURL(const std::string& data_url, | 110 bool LoadDataWithBaseURL(const std::string& data_url, |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 // This is used to ensure pending tasks will not fire after this object is | 380 // This is used to ensure pending tasks will not fire after this object is |
381 // destroyed. | 381 // destroyed. |
382 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 382 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
383 | 383 |
384 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 384 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
385 }; | 385 }; |
386 | 386 |
387 } // namespace extensions | 387 } // namespace extensions |
388 | 388 |
389 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 389 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
OLD | NEW |