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

Unified Diff: views/widget/native_widget_views.h

Issue 7065042: Hook up more of the NativeWidgetViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
Index: views/widget/native_widget_views.h
===================================================================
--- views/widget/native_widget_views.h (revision 86488)
+++ views/widget/native_widget_views.h (working copy)
@@ -2,26 +2,34 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
-#define VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
+#ifndef VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_
+#define VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_
#pragma once
#include "base/message_loop.h"
#include "views/widget/native_widget.h"
namespace views {
+namespace internal {
+class NativeWidgetView;
+}
+////////////////////////////////////////////////////////////////////////////////
+// NativeWidgetViews
+//
+// A NativeWidget implementation that uses another View as its native widget.
+//
class NativeWidgetViews : public NativeWidget {
public:
- explicit NativeWidgetViews(internal::NativeWidgetDelegate* delegate);
+ NativeWidgetViews(View* host, internal::NativeWidgetDelegate* delegate);
virtual ~NativeWidgetViews();
// TODO(beng): remove.
View* GetView();
+ internal::NativeWidgetDelegate* delegate() { return delegate_; }
+
private:
- class NativeWidgetView;
-
// Overridden from NativeWidget:
virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE;
virtual Widget* GetWidget() OVERRIDE;
@@ -72,8 +80,10 @@
internal::NativeWidgetDelegate* delegate_;
- NativeWidgetView* view_;
+ internal::NativeWidgetView* view_;
+ View* host_view_;
+
// The following factory is used for calls to close the NativeWidgetViews
// instance.
ScopedRunnableMethodFactory<NativeWidgetViews> close_widget_factory_;
@@ -83,4 +93,4 @@
}
-#endif // VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
+#endif // VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_

Powered by Google App Engine
This is Rietveld 408576698