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

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

Issue 7717011: Get rid of static TabContentsView::Create function since the interface is in content, but the imp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix mac build Created 9 years, 4 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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_mac.mm ('k') | chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698