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

Unified Diff: content/browser/web_contents/web_contents_view_cast.h

Issue 223583003: Exclude wifi_data_provider_linux.cc for chromecast build as chromecast uses wpa_supplicant instead … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add chromecast-specific content port implementation. 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: content/browser/web_contents/web_contents_view_cast.h
diff --git a/content/browser/web_contents/web_contents_view_android.h b/content/browser/web_contents/web_contents_view_cast.h
similarity index 64%
copy from content/browser/web_contents/web_contents_view_android.h
copy to content/browser/web_contents/web_contents_view_cast.h
index a5fb44cbcb4a3b8308bcfd3daf5610eccd1ccc23..630996b09b2897f3a610d1cdeb136dd134357709 100644
--- a/content/browser/web_contents/web_contents_view_android.h
+++ b/content/browser/web_contents/web_contents_view_cast.h
@@ -1,35 +1,42 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
-#define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
+#ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_CAST_H_
+#define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_CAST_H_
#include "base/memory/scoped_ptr.h"
-#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/common/content_export.h"
#include "content/port/browser/render_view_host_delegate_view.h"
#include "content/port/browser/web_contents_view_port.h"
-#include "content/public/browser/web_contents_view_delegate.h"
-#include "content/public/common/context_menu_params.h"
-#include "ui/gfx/rect_f.h"
+
+// Chromecast porting notes: This file was completed derived from the GTK
+// version.
namespace content {
-class ContentViewCoreImpl;
-// Android-specific implementation of the WebContentsView.
-class WebContentsViewAndroid : public WebContentsViewPort,
- public RenderViewHostDelegateView {
+class WebContents;
+class WebContentsImpl;
+class WebContentsViewDelegate;
+
+class CONTENT_EXPORT WebContentsViewCast
+ : public WebContentsViewPort,
+ public RenderViewHostDelegateView {
public:
- WebContentsViewAndroid(WebContentsImpl* web_contents,
- WebContentsViewDelegate* delegate);
- virtual ~WebContentsViewAndroid();
+ // The corresponding WebContentsImpl is passed in the constructor, and manages
+ // our lifetime. This doesn't need to be the case, but is this way currently
+ // because that's what was easiest when they were split. We optionally take
+ // |wrapper| which creates an intermediary widget layer for features from the
+ // Embedding layer that lives with the WebContentsView.
+ explicit WebContentsViewCast(WebContentsImpl* web_contents,
+ WebContentsViewDelegate* delegate);
+ virtual ~WebContentsViewCast();
- // Sets the interface to the view system. ContentViewCoreImpl is owned
- // by its Java ContentViewCore counterpart, whose lifetime is managed
- // by the UI frontend.
- void SetContentViewCore(ContentViewCoreImpl* content_view_core);
+ WebContentsViewDelegate* delegate() const { return delegate_.get(); }
+ WebContents* web_contents();
// WebContentsView implementation --------------------------------------------
+
virtual gfx::NativeView GetNativeView() const OVERRIDE;
virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE;
@@ -45,8 +52,9 @@ class WebContentsViewAndroid : public WebContentsViewPort,
virtual gfx::Rect GetViewBounds() const OVERRIDE;
// WebContentsViewPort implementation ----------------------------------------
- virtual void CreateView(
- const gfx::Size& initial_size, gfx::NativeView context) OVERRIDE;
+
+ virtual void CreateView(const gfx::Size& initial_size,
+ gfx::NativeView context) OVERRIDE;
virtual RenderWidgetHostView* CreateViewForWidget(
RenderWidgetHost* render_widget_host) OVERRIDE;
virtual RenderWidgetHostView* CreateViewForPopupWidget(
@@ -66,7 +74,6 @@ class WebContentsViewAndroid : public WebContentsViewPort,
const std::vector<MenuItem>& items,
bool right_aligned,
bool allow_multiple_selection) OVERRIDE;
- virtual void HidePopupMenu() OVERRIDE;
virtual void StartDragging(const DropData& drop_data,
blink::WebDragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
@@ -77,18 +84,17 @@ class WebContentsViewAndroid : public WebContentsViewPort,
virtual void TakeFocus(bool reverse) OVERRIDE;
private:
- // The WebContents whose contents we display.
+ // The WebContentsImpl whose contents we display.
WebContentsImpl* web_contents_;
- // ContentViewCoreImpl is our interface to the view system.
- ContentViewCoreImpl* content_view_core_;
-
- // Interface for extensions to WebContentsView. Used to show the context menu.
scoped_ptr<WebContentsViewDelegate> delegate_;
- DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid);
+ // The size we want the web contents view to be.
+ gfx::Size requested_size_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebContentsViewCast);
};
-} // namespace content
+} // namespace content
-#endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
+#endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_CAST_H_

Powered by Google App Engine
This is Rietveld 408576698