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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 std::string* partition_domain, | 49 std::string* partition_domain, |
50 std::string* partition_name, | 50 std::string* partition_name, |
51 bool* in_memory); | 51 bool* in_memory); |
52 | 52 |
53 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a | 53 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a |
54 // WebViewGuest. | 54 // WebViewGuest. |
55 static int GetViewInstanceId(content::WebContents* contents); | 55 static int GetViewInstanceId(content::WebContents* contents); |
56 | 56 |
57 static const char Type[]; | 57 static const char Type[]; |
58 | 58 |
59 // Return the stored rules registry ID of the given webview. Will generate | 59 // Returns the stored rules registry ID of the given webview. Will generate |
60 // an ID for the first query. | 60 // an ID for the first query. |
61 static int GetOrGenerateRulesRegistryID( | 61 static int GetOrGenerateRulesRegistryID( |
62 int embedder_process_id, | 62 int embedder_process_id, |
63 int web_view_instance_id); | 63 int web_view_instance_id); |
64 | 64 |
65 // Request navigating the guest to the provided |src| URL. | 65 // Request navigating the guest to the provided |src| URL. |
66 void NavigateGuest(const std::string& src, bool force_navigation); | 66 void NavigateGuest(const std::string& src, bool force_navigation); |
67 | 67 |
68 // Shows the context menu for the guest. | 68 // Shows the context menu for the guest. |
69 // |items| acts as a filter. This restricts the current context's default | 69 // |items| acts as a filter. This restricts the current context's default |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 // This is used to ensure pending tasks will not fire after this object is | 365 // This is used to ensure pending tasks will not fire after this object is |
366 // destroyed. | 366 // destroyed. |
367 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 367 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
368 | 368 |
369 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 369 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
370 }; | 370 }; |
371 | 371 |
372 } // namespace extensions | 372 } // namespace extensions |
373 | 373 |
374 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 374 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
OLD | NEW |