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

Unified Diff: chrome/browser/guest_view/web_view/web_view_guest.h

Issue 237533008: Refactor GuestView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Solve conflicts. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/guest_view/web_view/web_view_guest.h
diff --git a/chrome/browser/guestview/webview/webview_guest.h b/chrome/browser/guest_view/web_view/web_view_guest.h
similarity index 94%
rename from chrome/browser/guestview/webview/webview_guest.h
rename to chrome/browser/guest_view/web_view/web_view_guest.h
index 6b22a0189fa2bdcf1f9260e9c50ec2984690833f..d0a50b72ac98bab27b3cfea39b90e20362f5a22f 100644
--- a/chrome/browser/guestview/webview/webview_guest.h
+++ b/chrome/browser/guest_view/web_view/web_view_guest.h
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
-#define CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
+#ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
+#define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
#include "base/observer_list.h"
#include "chrome/browser/extensions/tab_helper.h"
-#include "chrome/browser/guestview/guestview.h"
-#include "chrome/browser/guestview/webview/javascript_dialog_helper.h"
-#include "chrome/browser/guestview/webview/webview_find_helper.h"
+#include "chrome/browser/guest_view/guest_view.h"
+#include "chrome/browser/guest_view/web_view/javascript_dialog_helper.h"
+#include "chrome/browser/guest_view/web_view/web_view_find_helper.h"
#include "content/public/browser/javascript_dialog_manager.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
@@ -31,25 +31,21 @@ class WebviewFindFunction;
// a particular embedder WebContents. This happens on either initial navigation
// or through the use of the New Window API, when a new window is attached to
// a particular <webview>.
-class WebViewGuest : public GuestView,
+class WebViewGuest : public GuestView<WebViewGuest>,
public content::NotificationObserver,
public content::WebContentsObserver {
public:
WebViewGuest(content::WebContents* guest_web_contents,
const std::string& embedder_extension_id);
- static WebViewGuest* From(int embedder_process_id, int instance_id);
- static WebViewGuest* FromWebContents(content::WebContents* contents);
// Returns guestview::kInstanceIDNone if |contents| does not correspond to a
// WebViewGuest.
static int GetViewInstanceId(content::WebContents* contents);
+ static const char Type[];
- // GuestView implementation.
+ // GuestViewBase implementation.
virtual void Attach(content::WebContents* embedder_web_contents,
const base::DictionaryValue& args) OVERRIDE;
- virtual GuestView::Type GetViewType() const OVERRIDE;
- virtual WebViewGuest* AsWebView() OVERRIDE;
- virtual AdViewGuest* AsAdView() OVERRIDE;
// GuestDelegate implementation.
virtual void AddMessageToConsole(int32 level,
@@ -324,4 +320,4 @@ class WebViewGuest : public GuestView,
DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
};
-#endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
+#endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
« no previous file with comments | « chrome/browser/guest_view/web_view/web_view_find_helper.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