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

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

Issue 258373002: Towards moving guest management to chrome: Introduce GuestViewManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 6 years, 7 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 "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "chrome/browser/extensions/tab_helper.h" 9 #include "chrome/browser/extensions/tab_helper.h"
10 #include "chrome/browser/guest_view/guest_view.h" 10 #include "chrome/browser/guest_view/guest_view.h"
(...skipping 18 matching lines...) Expand all
29 // API and manages the lifetime of <webview> extension events. WebViewGuest is 29 // API and manages the lifetime of <webview> extension events. WebViewGuest is
30 // created on attachment. That is, when a guest WebContents is associated with 30 // created on attachment. That is, when a guest WebContents is associated with
31 // a particular embedder WebContents. This happens on either initial navigation 31 // a particular embedder WebContents. This happens on either initial navigation
32 // or through the use of the New Window API, when a new window is attached to 32 // or through the use of the New Window API, when a new window is attached to
33 // a particular <webview>. 33 // a particular <webview>.
34 class WebViewGuest : public GuestView<WebViewGuest>, 34 class WebViewGuest : public GuestView<WebViewGuest>,
35 public content::NotificationObserver, 35 public content::NotificationObserver,
36 public content::WebContentsObserver { 36 public content::WebContentsObserver {
37 public: 37 public:
38 WebViewGuest(content::WebContents* guest_web_contents, 38 WebViewGuest(content::WebContents* guest_web_contents,
39 const std::string& embedder_extension_id); 39 const std::string& embedder_extension_id,
40 const base::WeakPtr<GuestViewBase>& opener);
40 41
41 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a 42 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a
42 // WebViewGuest. 43 // WebViewGuest.
43 static int GetViewInstanceId(content::WebContents* contents); 44 static int GetViewInstanceId(content::WebContents* contents);
44 static const char Type[]; 45 static const char Type[];
45 46
46 // GuestViewBase implementation. 47 // GuestViewBase implementation.
47 virtual void Attach(content::WebContents* embedder_web_contents, 48 virtual void Attach(content::WebContents* embedder_web_contents,
48 const base::DictionaryValue& args) OVERRIDE; 49 const base::DictionaryValue& args) OVERRIDE;
49 50
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 scoped_ptr<chromeos::AccessibilityStatusSubscription> 315 scoped_ptr<chromeos::AccessibilityStatusSubscription>
315 accessibility_subscription_; 316 accessibility_subscription_;
316 #endif 317 #endif
317 318
318 std::map<int, int> bridge_id_to_request_id_map_; 319 std::map<int, int> bridge_id_to_request_id_map_;
319 320
320 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 321 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
321 }; 322 };
322 323
323 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 324 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698