| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ | 5 #ifndef CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ |
| 6 #define CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ | 6 #define CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_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/guestview/guestview.h" | 10 #include "chrome/browser/guestview/guestview.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // a particular <webview>. | 31 // a particular <webview>. |
| 32 class WebViewGuest : public GuestView, | 32 class WebViewGuest : public GuestView, |
| 33 public content::NotificationObserver, | 33 public content::NotificationObserver, |
| 34 public content::WebContentsObserver { | 34 public content::WebContentsObserver { |
| 35 public: | 35 public: |
| 36 WebViewGuest(content::WebContents* guest_web_contents, | 36 WebViewGuest(content::WebContents* guest_web_contents, |
| 37 const std::string& embedder_extension_id); | 37 const std::string& embedder_extension_id); |
| 38 | 38 |
| 39 static WebViewGuest* From(int embedder_process_id, int instance_id); | 39 static WebViewGuest* From(int embedder_process_id, int instance_id); |
| 40 static WebViewGuest* FromWebContents(content::WebContents* contents); | 40 static WebViewGuest* FromWebContents(content::WebContents* contents); |
| 41 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a |
| 42 // WebViewGuest. |
| 43 static int GetViewInstanceId(content::WebContents* contents); |
| 41 | 44 |
| 42 // GuestView implementation. | 45 // GuestView implementation. |
| 43 virtual void Attach(content::WebContents* embedder_web_contents, | 46 virtual void Attach(content::WebContents* embedder_web_contents, |
| 44 const base::DictionaryValue& args) OVERRIDE; | 47 const base::DictionaryValue& args) OVERRIDE; |
| 45 virtual GuestView::Type GetViewType() const OVERRIDE; | 48 virtual GuestView::Type GetViewType() const OVERRIDE; |
| 46 virtual WebViewGuest* AsWebView() OVERRIDE; | 49 virtual WebViewGuest* AsWebView() OVERRIDE; |
| 47 virtual AdViewGuest* AsAdView() OVERRIDE; | 50 virtual AdViewGuest* AsAdView() OVERRIDE; |
| 48 | 51 |
| 49 // GuestDelegate implementation. | 52 // GuestDelegate implementation. |
| 50 virtual void AddMessageToConsole(int32 level, | 53 virtual void AddMessageToConsole(int32 level, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 #if defined(OS_CHROMEOS) | 257 #if defined(OS_CHROMEOS) |
| 255 // Subscription to receive notifications on changes to a11y settings. | 258 // Subscription to receive notifications on changes to a11y settings. |
| 256 scoped_ptr<chromeos::AccessibilityStatusSubscription> | 259 scoped_ptr<chromeos::AccessibilityStatusSubscription> |
| 257 accessibility_subscription_; | 260 accessibility_subscription_; |
| 258 #endif | 261 #endif |
| 259 | 262 |
| 260 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 263 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
| 261 }; | 264 }; |
| 262 | 265 |
| 263 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ | 266 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ |
| OLD | NEW |