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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 ui_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 // |items| acts as a filter. This restricts the current context's default | 90 void ShowContextMenu(int request_id); |
91 // menu items to contain only the items from |items|. | |
92 // |items| == NULL means no filtering will be applied. | |
93 void ShowContextMenu( | |
94 int request_id, | |
95 const WebViewGuestDelegate::MenuItemVector* items); | |
96 | 91 |
97 // Sets the frame name of the guest. | 92 // Sets the frame name of the guest. |
98 void SetName(const std::string& name); | 93 void SetName(const std::string& name); |
99 const std::string& name() { return name_; } | 94 const std::string& name() { return name_; } |
100 | 95 |
101 // Set the zoom factor. | 96 // Set the zoom factor. |
102 void SetZoom(double zoom_factor); | 97 void SetZoom(double zoom_factor); |
103 | 98 |
104 // Set the zoom mode. | 99 // Set the zoom mode. |
105 void SetZoomMode(ui_zoom::ZoomController::ZoomMode zoom_mode); | 100 void SetZoomMode(ui_zoom::ZoomController::ZoomMode zoom_mode); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 // 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 |
386 // destroyed. | 381 // destroyed. |
387 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 382 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
388 | 383 |
389 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 384 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
390 }; | 385 }; |
391 | 386 |
392 } // namespace extensions | 387 } // namespace extensions |
393 | 388 |
394 #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 |