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

Side by Side Diff: chrome/browser/guestview/webview/webview_guest.h

Issue 237533008: Refactor GuestView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 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 23 matching lines...) Expand all
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 41 // Returns guestview::kInstanceIDNone if |contents| does not correspond to a
42 // WebViewGuest. 42 // WebViewGuest.
43 static int GetViewInstanceId(content::WebContents* contents); 43 static int GetViewInstanceId(content::WebContents* contents);
44 static GuestView::Type Type();
44 45
45 // GuestView implementation. 46 // GuestView implementation.
46 virtual void Attach(content::WebContents* embedder_web_contents, 47 virtual void Attach(content::WebContents* embedder_web_contents,
47 const base::DictionaryValue& args) OVERRIDE; 48 const base::DictionaryValue& args) OVERRIDE;
48 virtual GuestView::Type GetViewType() const OVERRIDE; 49 virtual GuestView::Type GetViewType() const OVERRIDE;
49 virtual WebViewGuest* AsWebView() OVERRIDE;
50 virtual AdViewGuest* AsAdView() OVERRIDE;
51 50
52 // GuestDelegate implementation. 51 // GuestDelegate implementation.
53 virtual void AddMessageToConsole(int32 level, 52 virtual void AddMessageToConsole(int32 level,
54 const base::string16& message, 53 const base::string16& message,
55 int32 line_no, 54 int32 line_no,
56 const base::string16& source_id) OVERRIDE; 55 const base::string16& source_id) OVERRIDE;
57 virtual void LoadProgressed(double progress) OVERRIDE; 56 virtual void LoadProgressed(double progress) OVERRIDE;
58 virtual void Close() OVERRIDE; 57 virtual void Close() OVERRIDE;
59 virtual void DidAttach() OVERRIDE; 58 virtual void DidAttach() OVERRIDE;
60 virtual void EmbedderDestroyed() OVERRIDE; 59 virtual void EmbedderDestroyed() OVERRIDE;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 scoped_ptr<chromeos::AccessibilityStatusSubscription> 284 scoped_ptr<chromeos::AccessibilityStatusSubscription>
286 accessibility_subscription_; 285 accessibility_subscription_;
287 #endif 286 #endif
288 287
289 std::map<int, int> bridge_id_to_request_id_map_; 288 std::map<int, int> bridge_id_to_request_id_map_;
290 289
291 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 290 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
292 }; 291 };
293 292
294 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ 293 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698