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

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

Issue 314853003: Move GuestViewBase::GetGuestPartitionConfigForSite to WebViewGuest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 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 30 matching lines...) Expand all
41 // a particular embedder WebContents. This happens on either initial navigation 41 // a particular embedder WebContents. This happens on either initial navigation
42 // or through the use of the New Window API, when a new window is attached to 42 // or through the use of the New Window API, when a new window is attached to
43 // a particular <webview>. 43 // a particular <webview>.
44 class WebViewGuest : public GuestView<WebViewGuest>, 44 class WebViewGuest : public GuestView<WebViewGuest>,
45 public content::NotificationObserver { 45 public content::NotificationObserver {
46 public: 46 public:
47 WebViewGuest(int guest_instance_id, 47 WebViewGuest(int guest_instance_id,
48 content::WebContents* guest_web_contents, 48 content::WebContents* guest_web_contents,
49 const std::string& embedder_extension_id); 49 const std::string& embedder_extension_id);
50 50
51 // For WebViewGuest, we create special guest processes, which host the
52 // tag content separately from the main application that embeds the tag.
53 // 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
55 // 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:
57 // chrome-guest://partition_domain/persist?partition_name
58 static bool GetGuestPartitionConfigForSite(const GURL& site,
59 std::string* partition_domain,
60 std::string* partition_name,
61 bool* in_memory);
62
51 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a 63 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a
52 // WebViewGuest. 64 // WebViewGuest.
53 static int GetViewInstanceId(content::WebContents* contents); 65 static int GetViewInstanceId(content::WebContents* contents);
54 static const char Type[]; 66 static const char Type[];
55 67
56 typedef std::vector<linked_ptr<webview_api::ContextMenuItem> > MenuItemVector; 68 typedef std::vector<linked_ptr<webview_api::ContextMenuItem> > MenuItemVector;
57 // Shows the context menu for the guest. 69 // Shows the context menu for the guest.
58 // |items| acts as a filter. This restricts the current context's default 70 // |items| acts as a filter. This restricts the current context's default
59 // menu items to contain only the items from |items|. 71 // menu items to contain only the items from |items|.
60 // |items| == NULL means no filtering will be applied. 72 // |items| == NULL means no filtering will be applied.
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 name(name) {} 441 name(name) {}
430 }; 442 };
431 443
432 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; 444 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap;
433 PendingWindowMap pending_new_windows_; 445 PendingWindowMap pending_new_windows_;
434 446
435 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 447 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
436 }; 448 };
437 449
438 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 450 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/guest_view_base.cc ('k') | chrome/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698