Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.h

Issue 1312653003: Fix for WebView accessible resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments by lfg@. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "components/guest_view/browser/guest_view.h" 11 #include "components/guest_view/browser/guest_view.h"
12 #include "content/public/browser/javascript_dialog_manager.h" 12 #include "content/public/browser/javascript_dialog_manager.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 #include "extensions/browser/guest_view/web_view/javascript_dialog_helper.h" 15 #include "extensions/browser/guest_view/web_view/javascript_dialog_helper.h"
16 #include "extensions/browser/guest_view/web_view/web_view_find_helper.h" 16 #include "extensions/browser/guest_view/web_view/web_view_find_helper.h"
17 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" 17 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h"
18 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" 18 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h"
19 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h" 19 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h"
20 #include "extensions/browser/script_executor.h" 20 #include "extensions/browser/script_executor.h"
21 21
22 struct ExtensionMsg_Loaded_Params;
23
22 namespace blink { 24 namespace blink {
23 struct WebFindOptions; 25 struct WebFindOptions;
24 } // nanespace blink 26 } // nanespace blink
25 27
26 namespace content { 28 namespace content {
27 struct GlobalRequestID; 29 struct GlobalRequestID;
28 } // namespace content 30 } // namespace content
29 31
30 namespace extensions { 32 namespace extensions {
31 33
(...skipping 21 matching lines...) Expand all
53 // A <webview> can specify both the partition name and whether the storage 55 // A <webview> can specify both the partition name and whether the storage
54 // for that partition should be persisted. Each tag gets a SiteInstance with 56 // for that partition should be persisted. Each tag gets a SiteInstance with
55 // a specially formatted URL, based on the application it is hosted by and 57 // a specially formatted URL, based on the application it is hosted by and
56 // the partition requested by it. The format for that URL is: 58 // the partition requested by it. The format for that URL is:
57 // chrome-guest://partition_domain/persist?partition_name 59 // chrome-guest://partition_domain/persist?partition_name
58 static bool GetGuestPartitionConfigForSite(const GURL& site, 60 static bool GetGuestPartitionConfigForSite(const GURL& site,
59 std::string* partition_domain, 61 std::string* partition_domain,
60 std::string* partition_name, 62 std::string* partition_name,
61 bool* in_memory); 63 bool* in_memory);
62 64
65 // Returns the webview partition ID associated with the render process
66 // represented by |render_process_host|, if any. Otherwise, nullptr is
67 // returned.
68 static std::string GetPartitionID(
69 const content::RenderProcessHost* render_process_host);
70
63 static const char Type[]; 71 static const char Type[];
64 72
65 // Returns the stored rules registry ID of the given webview. Will generate 73 // Returns the stored rules registry ID of the given webview. Will generate
66 // an ID for the first query. 74 // an ID for the first query.
67 static int GetOrGenerateRulesRegistryID( 75 static int GetOrGenerateRulesRegistryID(
68 int embedder_process_id, 76 int embedder_process_id,
69 int web_view_instance_id); 77 int web_view_instance_id);
70 78
71 // Get the current zoom. 79 // Get the current zoom.
72 double GetZoom() const; 80 double GetZoom() const;
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // This is used to ensure pending tasks will not fire after this object is 421 // This is used to ensure pending tasks will not fire after this object is
414 // destroyed. 422 // destroyed.
415 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; 423 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_;
416 424
417 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 425 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
418 }; 426 };
419 427
420 } // namespace extensions 428 } // namespace extensions
421 429
422 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 430 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698