| OLD | NEW |
| 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/ui/sad_tab_helper.h" | 8 #include "chrome/browser/ui/sad_tab_helper.h" |
| 9 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_win.h" | 9 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_win.h" |
| 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 11 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate
.h" | 11 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate
.h" |
| 12 #include "content/browser/web_contents/web_contents_drag_win.h" | 12 #include "content/browser/web_contents/web_contents_drag_win.h" |
| 13 #include "content/browser/web_contents/web_drag_dest_win.h" | 13 #include "content/browser/web_contents/web_drag_dest_win.h" |
| 14 #include "content/public/browser/render_widget_host_view.h" | 14 #include "content/public/browser/render_widget_host_view.h" |
| 15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 16 #include "content/public/browser/web_contents_view.h" | 16 #include "content/public/browser/web_contents_view.h" |
| 17 #include "ui/views/views_delegate.h" | 17 #include "ui/views/views_delegate.h" |
| 18 #include "ui/views/widget/widget.h" | 18 #include "ui/views/widget/widget.h" |
| 19 | 19 |
| 20 using content::RenderWidgetHostView; | 20 using content::RenderWidgetHostView; |
| 21 using content::WebContents; | 21 using content::WebContents; |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // See comment above TempParent in tab_contents_view_win.cc. | 25 // See comment above TempParent in web_contents_view_win.cc. |
| 26 // Also, Tabs must be created as child widgets, otherwise they will be given | 26 // Also, Tabs must be created as child widgets, otherwise they will be given |
| 27 // a FocusManager which will conflict with the FocusManager of the | 27 // a FocusManager which will conflict with the FocusManager of the |
| 28 // window they eventually end up attached to. | 28 // window they eventually end up attached to. |
| 29 class HiddenTabHostWindow : public views::Widget { | 29 class HiddenTabHostWindow : public views::Widget { |
| 30 public: | 30 public: |
| 31 static HWND Instance(); | 31 static HWND Instance(); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 HiddenTabHostWindow() {} | 34 HiddenTabHostWindow() {} |
| 35 | 35 |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 } | 333 } |
| 334 | 334 |
| 335 //////////////////////////////////////////////////////////////////////////////// | 335 //////////////////////////////////////////////////////////////////////////////// |
| 336 // NativeTabContentsView, public: | 336 // NativeTabContentsView, public: |
| 337 | 337 |
| 338 // static | 338 // static |
| 339 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( | 339 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( |
| 340 internal::NativeTabContentsViewDelegate* delegate) { | 340 internal::NativeTabContentsViewDelegate* delegate) { |
| 341 return new NativeTabContentsViewWin(delegate); | 341 return new NativeTabContentsViewWin(delegate); |
| 342 } | 342 } |
| OLD | NEW |