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 CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 6 #define CHROME_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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 typedef std::vector<linked_ptr<webview_api::ContextMenuItem> > MenuItemVector; | 56 typedef std::vector<linked_ptr<webview_api::ContextMenuItem> > MenuItemVector; |
57 // Shows the context menu for the guest. | 57 // Shows the context menu for the guest. |
58 // |items| acts as a filter. This restricts the current context's default | 58 // |items| acts as a filter. This restricts the current context's default |
59 // menu items to contain only the items from |items|. | 59 // menu items to contain only the items from |items|. |
60 // |items| == NULL means no filtering will be applied. | 60 // |items| == NULL means no filtering will be applied. |
61 void ShowContextMenu(int request_id, const MenuItemVector* items); | 61 void ShowContextMenu(int request_id, const MenuItemVector* items); |
62 | 62 |
63 // Sets the frame name of the guest. | 63 // Sets the frame name of the guest. |
64 void SetName(const std::string& name); | 64 void SetName(const std::string& name); |
65 | 65 |
| 66 // Set the zoom factor. |
| 67 void SetZoom(double zoom_factor); |
| 68 |
66 // GuestViewBase implementation. | 69 // GuestViewBase implementation. |
67 virtual void Attach(content::WebContents* embedder_web_contents, | 70 virtual void Attach(content::WebContents* embedder_web_contents, |
68 const base::DictionaryValue& args) OVERRIDE; | 71 const base::DictionaryValue& args) OVERRIDE; |
69 virtual void EmbedderDestroyed() OVERRIDE; | 72 virtual void EmbedderDestroyed() OVERRIDE; |
70 | 73 |
71 // WebContentsDelegate implementation. | 74 // WebContentsDelegate implementation. |
72 virtual bool AddMessageToConsole(content::WebContents* source, | 75 virtual bool AddMessageToConsole(content::WebContents* source, |
73 int32 level, | 76 int32 level, |
74 const base::string16& message, | 77 const base::string16& message, |
75 int32 line_no, | 78 int32 line_no, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 bool last_unlocked_by_target, | 135 bool last_unlocked_by_target, |
133 const base::Callback<void(bool)>& callback) OVERRIDE; | 136 const base::Callback<void(bool)>& callback) OVERRIDE; |
134 virtual void NavigateGuest(const std::string& src) OVERRIDE; | 137 virtual void NavigateGuest(const std::string& src) OVERRIDE; |
135 virtual void Destroy() OVERRIDE; | 138 virtual void Destroy() OVERRIDE; |
136 | 139 |
137 // NotificationObserver implementation. | 140 // NotificationObserver implementation. |
138 virtual void Observe(int type, | 141 virtual void Observe(int type, |
139 const content::NotificationSource& source, | 142 const content::NotificationSource& source, |
140 const content::NotificationDetails& details) OVERRIDE; | 143 const content::NotificationDetails& details) OVERRIDE; |
141 | 144 |
142 // Set the zoom factor. | |
143 virtual void SetZoom(double zoom_factor) OVERRIDE; | |
144 | |
145 // Returns the current zoom factor. | 145 // Returns the current zoom factor. |
146 double GetZoom(); | 146 double GetZoom(); |
147 | 147 |
148 // Begin or continue a find request. | 148 // Begin or continue a find request. |
149 void Find(const base::string16& search_text, | 149 void Find(const base::string16& search_text, |
150 const blink::WebFindOptions& options, | 150 const blink::WebFindOptions& options, |
151 scoped_refptr<extensions::WebviewFindFunction> find_function); | 151 scoped_refptr<extensions::WebviewFindFunction> find_function); |
152 | 152 |
153 // Conclude a find request to clear highlighting. | 153 // Conclude a find request to clear highlighting. |
154 void StopFinding(content::StopFindAction); | 154 void StopFinding(content::StopFindAction); |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 name(name) {} | 430 name(name) {} |
431 }; | 431 }; |
432 | 432 |
433 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; | 433 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; |
434 PendingWindowMap pending_new_windows_; | 434 PendingWindowMap pending_new_windows_; |
435 | 435 |
436 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 436 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
437 }; | 437 }; |
438 | 438 |
439 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 439 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
OLD | NEW |