| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // A <webview> can specify both the partition name and whether the storage | 51 // A <webview> can specify both the partition name and whether the storage |
| 52 // for that partition should be persisted. Each tag gets a SiteInstance with | 52 // for that partition should be persisted. Each tag gets a SiteInstance with |
| 53 // a specially formatted URL, based on the application it is hosted by and | 53 // a specially formatted URL, based on the application it is hosted by and |
| 54 // the partition requested by it. The format for that URL is: | 54 // the partition requested by it. The format for that URL is: |
| 55 // chrome-guest://partition_domain/persist?partition_name | 55 // chrome-guest://partition_domain/persist?partition_name |
| 56 static bool GetGuestPartitionConfigForSite(const GURL& site, | 56 static bool GetGuestPartitionConfigForSite(const GURL& site, |
| 57 std::string* partition_domain, | 57 std::string* partition_domain, |
| 58 std::string* partition_name, | 58 std::string* partition_name, |
| 59 bool* in_memory); | 59 bool* in_memory); |
| 60 | 60 |
| 61 // Returns guest_view::kInstanceIDNone if |contents| does not correspond to a | |
| 62 // WebViewGuest. | |
| 63 static int GetViewInstanceId(content::WebContents* contents); | |
| 64 | |
| 65 static const char Type[]; | 61 static const char Type[]; |
| 66 | 62 |
| 67 // Returns the stored rules registry ID of the given webview. Will generate | 63 // Returns the stored rules registry ID of the given webview. Will generate |
| 68 // an ID for the first query. | 64 // an ID for the first query. |
| 69 static int GetOrGenerateRulesRegistryID( | 65 static int GetOrGenerateRulesRegistryID( |
| 70 int embedder_process_id, | 66 int embedder_process_id, |
| 71 int web_view_instance_id); | 67 int web_view_instance_id); |
| 72 | 68 |
| 73 // Get the current zoom. | 69 // Get the current zoom. |
| 74 double GetZoom() const; | 70 double GetZoom() const; |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 // This is used to ensure pending tasks will not fire after this object is | 409 // This is used to ensure pending tasks will not fire after this object is |
| 414 // destroyed. | 410 // destroyed. |
| 415 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 411 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
| 416 | 412 |
| 417 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 413 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
| 418 }; | 414 }; |
| 419 | 415 |
| 420 } // namespace extensions | 416 } // namespace extensions |
| 421 | 417 |
| 422 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 418 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
| OLD | NEW |