| 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/tab_contents/tab_contents_view_touch.h" | 5 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_touch.h" |
| 6 | 6 |
| 7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
| 8 #undef Status | 8 #undef Status |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "views/widget/widget.h" | 28 #include "views/widget/widget.h" |
| 29 | 29 |
| 30 using WebKit::WebDragOperation; | 30 using WebKit::WebDragOperation; |
| 31 using WebKit::WebDragOperationsMask; | 31 using WebKit::WebDragOperationsMask; |
| 32 using WebKit::WebInputEvent; | 32 using WebKit::WebInputEvent; |
| 33 | 33 |
| 34 // static | 34 // static |
| 35 const char TabContentsViewTouch::kViewClassName[] = | 35 const char TabContentsViewTouch::kViewClassName[] = |
| 36 "browser/ui/views/tab_contents/TabContentsViewTouch"; | 36 "browser/ui/views/tab_contents/TabContentsViewTouch"; |
| 37 | 37 |
| 38 // static | |
| 39 TabContentsView* TabContentsView::Create(TabContents* tab_contents) { | |
| 40 return new TabContentsViewTouch(tab_contents); | |
| 41 } | |
| 42 | |
| 43 TabContentsViewTouch::TabContentsViewTouch(TabContents* tab_contents) | 38 TabContentsViewTouch::TabContentsViewTouch(TabContents* tab_contents) |
| 44 : tab_contents_(tab_contents), | 39 : tab_contents_(tab_contents), |
| 45 sad_tab_(NULL), | 40 sad_tab_(NULL), |
| 46 ignore_next_char_event_(false) { | 41 ignore_next_char_event_(false) { |
| 47 last_focused_view_storage_id_ = | 42 last_focused_view_storage_id_ = |
| 48 views::ViewStorage::GetInstance()->CreateStorageID(); | 43 views::ViewStorage::GetInstance()->CreateStorageID(); |
| 49 SetLayoutManager(new views::FillLayout()); | 44 SetLayoutManager(new views::FillLayout()); |
| 50 } | 45 } |
| 51 | 46 |
| 52 TabContentsViewTouch::~TabContentsViewTouch() { | 47 TabContentsViewTouch::~TabContentsViewTouch() { |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 rwhv->SetSize(size); | 424 rwhv->SetSize(size); |
| 430 | 425 |
| 431 if (needs_resize) | 426 if (needs_resize) |
| 432 SetFloatingPosition(size); | 427 SetFloatingPosition(size); |
| 433 } | 428 } |
| 434 | 429 |
| 435 void TabContentsViewTouch::SetFloatingPosition(const gfx::Size& size) { | 430 void TabContentsViewTouch::SetFloatingPosition(const gfx::Size& size) { |
| 436 // TODO(anicolao): rework this once we have WebUI views for dialogs | 431 // TODO(anicolao): rework this once we have WebUI views for dialogs |
| 437 SetBounds(x(), y(), size.width(), size.height()); | 432 SetBounds(x(), y(), size.width(), size.height()); |
| 438 } | 433 } |
| OLD | NEW |