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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // Clears data in the storage partition of this guest. | 236 // Clears data in the storage partition of this guest. |
237 // | 237 // |
238 // Partition data that are newer than |removal_since| will be removed. | 238 // Partition data that are newer than |removal_since| will be removed. |
239 // |removal_mask| corresponds to bitmask in StoragePartition::RemoveDataMask. | 239 // |removal_mask| corresponds to bitmask in StoragePartition::RemoveDataMask. |
240 bool ClearData(const base::Time remove_since, | 240 bool ClearData(const base::Time remove_since, |
241 uint32 removal_mask, | 241 uint32 removal_mask, |
242 const base::Closure& callback); | 242 const base::Closure& callback); |
243 | 243 |
244 ScriptExecutor* script_executor() { return script_executor_.get(); } | 244 ScriptExecutor* script_executor() { return script_executor_.get(); } |
245 | 245 |
| 246 scoped_ptr<WebViewGuestDelegate> SetDelegateForTesting( |
| 247 scoped_ptr<WebViewGuestDelegate> delegate) { |
| 248 web_view_guest_delegate_.swap(delegate); |
| 249 return delegate.Pass(); |
| 250 } |
| 251 |
246 private: | 252 private: |
247 friend class WebViewPermissionHelper; | 253 friend class WebViewPermissionHelper; |
248 | 254 |
249 explicit WebViewGuest(content::WebContents* owner_web_contents); | 255 explicit WebViewGuest(content::WebContents* owner_web_contents); |
250 | 256 |
251 ~WebViewGuest() override; | 257 ~WebViewGuest() override; |
252 | 258 |
253 void AttachWebViewHelpers(content::WebContents* contents); | 259 void AttachWebViewHelpers(content::WebContents* contents); |
254 | 260 |
| 261 void ClearDataInternal(const base::Time remove_since, |
| 262 uint32 removal_mask, |
| 263 const base::Closure& callback); |
| 264 |
255 void OnWebViewNewWindowResponse(int new_window_instance_id, | 265 void OnWebViewNewWindowResponse(int new_window_instance_id, |
256 bool allow, | 266 bool allow, |
257 const std::string& user_input); | 267 const std::string& user_input); |
258 | 268 |
259 void OnFullscreenPermissionDecided(bool allowed, | 269 void OnFullscreenPermissionDecided(bool allowed, |
260 const std::string& user_input); | 270 const std::string& user_input); |
261 bool GuestMadeEmbedderFullscreen() const; | 271 bool GuestMadeEmbedderFullscreen() const; |
262 void SetFullscreenState(bool is_fullscreen); | 272 void SetFullscreenState(bool is_fullscreen); |
263 | 273 |
264 // WebContentsObserver implementation. | 274 // WebContentsObserver implementation. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // This is used to ensure pending tasks will not fire after this object is | 397 // This is used to ensure pending tasks will not fire after this object is |
388 // destroyed. | 398 // destroyed. |
389 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 399 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
390 | 400 |
391 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 401 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
392 }; | 402 }; |
393 | 403 |
394 } // namespace extensions | 404 } // namespace extensions |
395 | 405 |
396 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 406 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
OLD | NEW |