| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/dom_view.h" | 5 #include "chrome/browser/ui/views/dom_view.h" |
| 6 | 6 |
| 7 #include "content/browser/tab_contents/tab_contents.h" | 7 #include "content/browser/tab_contents/tab_contents.h" |
| 8 #include "views/focus/focus_manager.h" | 8 #include "views/focus/focus_manager.h" |
| 9 | 9 |
| 10 #if defined(TOUCH_UI) | 10 #if defined(TOUCH_UI) |
| 11 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_touch.h" | 11 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_touch.h" |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 // static | 14 // static |
| 15 const char DOMView::kViewClassName[] = | 15 const char DOMView::kViewClassName[] = |
| 16 "browser/ui/views/DOMView"; | 16 "browser/ui/views/DOMView"; |
| 17 | 17 |
| 18 DOMView::DOMView() : tab_contents_(NULL), initialized_(false) { | 18 DOMView::DOMView() : tab_contents_(NULL), initialized_(false) { |
| 19 SetFocusable(true); | 19 set_focusable(true); |
| 20 } | 20 } |
| 21 | 21 |
| 22 DOMView::~DOMView() { | 22 DOMView::~DOMView() { |
| 23 if (native_view()) | 23 if (native_view()) |
| 24 Detach(); | 24 Detach(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 std::string DOMView::GetClassName() const { | 27 std::string DOMView::GetClassName() const { |
| 28 return kViewClassName; | 28 return kViewClassName; |
| 29 } | 29 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 Detach(); | 73 Detach(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void DOMView::AttachTabContents() { | 76 void DOMView::AttachTabContents() { |
| 77 #if defined(TOUCH_UI) | 77 #if defined(TOUCH_UI) |
| 78 AttachToView(static_cast<TabContentsViewTouch*>(tab_contents_->view())); | 78 AttachToView(static_cast<TabContentsViewTouch*>(tab_contents_->view())); |
| 79 #else | 79 #else |
| 80 Attach(tab_contents_->GetNativeView()); | 80 Attach(tab_contents_->GetNativeView()); |
| 81 #endif | 81 #endif |
| 82 } | 82 } |
| OLD | NEW |