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

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

Issue 299753011: Move allocate instance id to chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: HasPermission function moved 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // the partition requested by it. The format for that URL is: 56 // the partition requested by it. The format for that URL is:
57 // chrome-guest://partition_domain/persist?partition_name 57 // chrome-guest://partition_domain/persist?partition_name
58 static bool GetGuestPartitionConfigForSite(const GURL& site, 58 static bool GetGuestPartitionConfigForSite(const GURL& site,
59 std::string* partition_domain, 59 std::string* partition_domain,
60 std::string* partition_name, 60 std::string* partition_name,
61 bool* in_memory); 61 bool* in_memory);
62 62
63 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a 63 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a
64 // WebViewGuest. 64 // WebViewGuest.
65 static int GetViewInstanceId(content::WebContents* contents); 65 static int GetViewInstanceId(content::WebContents* contents);
66 // Parses partition related parameters from |extra_params|.
67 // |storage_partition_id| is the parsed partition ID and |persist_storage|
68 // specifies whether or not the partition is in memory.
69 static void ParsePartitionParam(const base::DictionaryValue* extra_params,
70 std::string* storage_partition_id,
71 bool* persist_storage);
66 static const char Type[]; 72 static const char Type[];
67 73
74 // Request navigating the guest to the provided |src| URL.
75 void NavigateGuest(const std::string& src);
76
68 typedef std::vector<linked_ptr<webview_api::ContextMenuItem> > MenuItemVector; 77 typedef std::vector<linked_ptr<webview_api::ContextMenuItem> > MenuItemVector;
69 // Shows the context menu for the guest. 78 // Shows the context menu for the guest.
70 // |items| acts as a filter. This restricts the current context's default 79 // |items| acts as a filter. This restricts the current context's default
71 // menu items to contain only the items from |items|. 80 // menu items to contain only the items from |items|.
72 // |items| == NULL means no filtering will be applied. 81 // |items| == NULL means no filtering will be applied.
73 void ShowContextMenu(int request_id, const MenuItemVector* items); 82 void ShowContextMenu(int request_id, const MenuItemVector* items);
74 83
75 // Sets the frame name of the guest. 84 // Sets the frame name of the guest.
76 void SetName(const std::string& name); 85 void SetName(const std::string& name);
77 86
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 virtual content::WebContents* OpenURLFromTab( 144 virtual content::WebContents* OpenURLFromTab(
136 content::WebContents* source, 145 content::WebContents* source,
137 const content::OpenURLParams& params) OVERRIDE; 146 const content::OpenURLParams& params) OVERRIDE;
138 virtual void WebContentsCreated(content::WebContents* source_contents, 147 virtual void WebContentsCreated(content::WebContents* source_contents,
139 int opener_render_frame_id, 148 int opener_render_frame_id,
140 const base::string16& frame_name, 149 const base::string16& frame_name,
141 const GURL& target_url, 150 const GURL& target_url,
142 content::WebContents* new_contents) OVERRIDE; 151 content::WebContents* new_contents) OVERRIDE;
143 152
144 // BrowserPluginGuestDelegate implementation. 153 // BrowserPluginGuestDelegate implementation.
145 virtual void DidAttach() OVERRIDE; 154 virtual void DidAttach(const base::DictionaryValue& extra_params) OVERRIDE;
146 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size) 155 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size)
147 OVERRIDE; 156 OVERRIDE;
148 virtual void RequestPointerLockPermission( 157 virtual void RequestPointerLockPermission(
149 bool user_gesture, 158 bool user_gesture,
150 bool last_unlocked_by_target, 159 bool last_unlocked_by_target,
151 const base::Callback<void(bool)>& callback) OVERRIDE; 160 const base::Callback<void(bool)>& callback) OVERRIDE;
152 virtual void NavigateGuest(const std::string& src) OVERRIDE;
153 161
154 // NotificationObserver implementation. 162 // NotificationObserver implementation.
155 virtual void Observe(int type, 163 virtual void Observe(int type,
156 const content::NotificationSource& source, 164 const content::NotificationSource& source,
157 const content::NotificationDetails& details) OVERRIDE; 165 const content::NotificationDetails& details) OVERRIDE;
158 166
159 // Returns the current zoom factor. 167 // Returns the current zoom factor.
160 double GetZoom(); 168 double GetZoom();
161 169
162 // Begin or continue a find request. 170 // Begin or continue a find request.
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 name(name) {} 449 name(name) {}
442 }; 450 };
443 451
444 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; 452 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap;
445 PendingWindowMap pending_new_windows_; 453 PendingWindowMap pending_new_windows_;
446 454
447 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 455 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
448 }; 456 };
449 457
450 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 458 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/web_view/web_view_constants.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