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

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

Issue 9594012: Move TabContentsDragWin to content and rename it to WebContentsDragWin. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.h" 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_win.h" 8 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_win.h"
9 #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_delegate .h"
10 #include "chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h" 10 #include "content/browser/tab_contents/web_contents_drag_win.h"
11 #include "content/browser/tab_contents/web_drag_dest_win.h" 11 #include "content/browser/tab_contents/web_drag_dest_win.h"
12 #include "content/public/browser/render_widget_host_view.h" 12 #include "content/public/browser/render_widget_host_view.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/browser/web_contents_view.h" 14 #include "content/public/browser/web_contents_view.h"
15 #include "ui/views/views_delegate.h" 15 #include "ui/views/views_delegate.h"
16 #include "ui/views/widget/widget.h" 16 #include "ui/views/widget/widget.h"
17 17
18 using content::RenderWidgetHostView; 18 using content::RenderWidgetHostView;
19 using content::WebContents; 19 using content::WebContents;
20 20
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 void NativeTabContentsViewWin::SetPageTitle(const string16& title) { 129 void NativeTabContentsViewWin::SetPageTitle(const string16& title) {
130 // It's possible to get this after the hwnd has been destroyed. 130 // It's possible to get this after the hwnd has been destroyed.
131 if (GetNativeView()) 131 if (GetNativeView())
132 ::SetWindowText(GetNativeView(), title.c_str()); 132 ::SetWindowText(GetNativeView(), title.c_str());
133 } 133 }
134 134
135 void NativeTabContentsViewWin::StartDragging(const WebDropData& drop_data, 135 void NativeTabContentsViewWin::StartDragging(const WebDropData& drop_data,
136 WebKit::WebDragOperationsMask ops, 136 WebKit::WebDragOperationsMask ops,
137 const SkBitmap& image, 137 const SkBitmap& image,
138 const gfx::Point& image_offset) { 138 const gfx::Point& image_offset) {
139 drag_handler_ = new TabContentsDragWin( 139 drag_handler_ = new WebContentsDragWin(
140 GetNativeView(), 140 GetNativeView(),
141 delegate_->GetWebContents(), 141 delegate_->GetWebContents(),
142 drag_dest_, 142 drag_dest_,
143 base::Bind(&NativeTabContentsViewWin::EndDragging, 143 base::Bind(&NativeTabContentsViewWin::EndDragging,
144 base::Unretained(this))); 144 base::Unretained(this)));
145 drag_handler_->StartDragging(drop_data, ops, image, image_offset); 145 drag_handler_->StartDragging(drop_data, ops, image, image_offset);
146 } 146 }
147 147
148 void NativeTabContentsViewWin::CancelDrag() { 148 void NativeTabContentsViewWin::CancelDrag() {
149 drag_handler_->CancelDrag(); 149 drag_handler_->CancelDrag();
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 346
347 //////////////////////////////////////////////////////////////////////////////// 347 ////////////////////////////////////////////////////////////////////////////////
348 // NativeTabContentsView, public: 348 // NativeTabContentsView, public:
349 349
350 // static 350 // static
351 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( 351 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView(
352 internal::NativeTabContentsViewDelegate* delegate) { 352 internal::NativeTabContentsViewDelegate* delegate) {
353 return new NativeTabContentsViewWin(delegate); 353 return new NativeTabContentsViewWin(delegate);
354 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698