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

Side by Side Diff: chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc

Issue 7841012: Get chrome to link with USE_AURA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.h"
6
7 #include "chrome/browser/tab_contents/web_drop_target_win.h"
8 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate .h"
9 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_views.h"
10 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
11 #include "content/browser/tab_contents/tab_contents.h"
12 #include "content/browser/tab_contents/tab_contents_view.h"
13 #include "views/views_delegate.h"
14 #include "views/widget/widget.h"
15
16 ////////////////////////////////////////////////////////////////////////////////
17 // NativeTabContentsViewAura, public:
18
19 NativeTabContentsViewAura::NativeTabContentsViewAura(
20 internal::NativeTabContentsViewDelegate* delegate)
21 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()),
22 delegate_(delegate) {
23 }
24
25 NativeTabContentsViewAura::~NativeTabContentsViewAura() {
26 }
27
28 TabContents* NativeTabContentsViewAura::GetTabContents() const {
29 return delegate_->GetTabContents();
30 }
31
32 void NativeTabContentsViewAura::EndDragging() {
33 delegate_->OnNativeTabContentsViewDraggingEnded();
34 // TODO(beng):
35 NOTIMPLEMENTED();
36 }
37
38 ////////////////////////////////////////////////////////////////////////////////
39 // NativeTabContentsViewAura, NativeTabContentsView implementation:
40
41 void NativeTabContentsViewAura::InitNativeTabContentsView() {
42 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
43 params.native_widget = this;
44 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
45 params.parent = NULL;
46 GetWidget()->Init(params);
47 }
48
49 void NativeTabContentsViewAura::Unparent() {
50 // Note that we do not DCHECK on focus_manager_ as it may be NULL when used
51 // with an external tab container.
52 views::Widget::ReparentNativeView(GetNativeView(), NULL);
53 // TODO(beng):
54 NOTIMPLEMENTED();
55 }
56
57 RenderWidgetHostView* NativeTabContentsViewAura::CreateRenderWidgetHostView(
58 RenderWidgetHost* render_widget_host) {
59 #if !defined(USE_AURA)
60 RenderWidgetHostViewWin* view =
61 new RenderWidgetHostViewWin(render_widget_host);
62 view->CreateWnd(GetNativeView());
63 view->ShowWindow(SW_SHOW);
64 return view;
65 #else
66 // TODO(beng): probably return RenderWidgetHostViewViews.
67 NOTIMPLEMENTED();
68 return NULL;
69 #endif
70 }
71
72 gfx::NativeWindow NativeTabContentsViewAura::GetTopLevelNativeWindow() const {
73 // TODO(beng):
74 NOTIMPLEMENTED();
75 return NULL;
76 }
77
78 void NativeTabContentsViewAura::SetPageTitle(const std::wstring& title) {
79 // TODO(beng):
80 NOTIMPLEMENTED();
81 }
82
83 void NativeTabContentsViewAura::StartDragging(const WebDropData& drop_data,
84 WebKit::WebDragOperationsMask ops,
85 const SkBitmap& image,
86 const gfx::Point& image_offset) {
87 // TODO(beng):
88 NOTIMPLEMENTED();
89 }
90
91 void NativeTabContentsViewAura::CancelDrag() {
92 // TODO(beng):
93 NOTIMPLEMENTED();
94 }
95
96 bool NativeTabContentsViewAura::IsDoingDrag() const {
97 // TODO(beng):
98 NOTIMPLEMENTED();
99 return false;
100 }
101
102 void NativeTabContentsViewAura::SetDragCursor(
103 WebKit::WebDragOperation operation) {
104 // TODO(beng):
105 NOTIMPLEMENTED();
106 }
107
108 views::NativeWidget* NativeTabContentsViewAura::AsNativeWidget() {
109 return this;
110 }
111
112 ////////////////////////////////////////////////////////////////////////////////
113 // NativeTabContentsViewWin, views::NativeWidgetWin overrides:
114
115 ////////////////////////////////////////////////////////////////////////////////
116 // NativeTabContentsView, public:
117
118 // static
119 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView(
120 internal::NativeTabContentsViewDelegate* delegate) {
121 return new NativeTabContentsViewAura(delegate);
122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698