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

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

Issue 6284003: Modify a method that was added mid-refactoring so that it follows the new structure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_container.h" 5 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
6 6
7 #include "chrome/browser/renderer_host/render_view_host.h" 7 #include "chrome/browser/renderer_host/render_view_host.h"
8 #include "chrome/browser/renderer_host/render_widget_host_view.h" 8 #include "chrome/browser/renderer_host/render_widget_host_view.h"
9 #include "chrome/browser/tab_contents/interstitial_page.h" 9 #include "chrome/browser/tab_contents/interstitial_page.h"
10 #include "chrome/browser/tab_contents/tab_contents.h" 10 #include "chrome/browser/tab_contents/tab_contents.h"
(...skipping 10 matching lines...) Expand all
21 // native view host approach. See the header file for details. 21 // native view host approach. See the header file for details.
22 22
23 //////////////////////////////////////////////////////////////////////////////// 23 ////////////////////////////////////////////////////////////////////////////////
24 // TabContentsContainer, public: 24 // TabContentsContainer, public:
25 25
26 TabContentsContainer::TabContentsContainer() 26 TabContentsContainer::TabContentsContainer()
27 : tab_contents_(NULL) { 27 : tab_contents_(NULL) {
28 SetID(VIEW_ID_TAB_CONTAINER); 28 SetID(VIEW_ID_TAB_CONTAINER);
29 } 29 }
30 30
31 void TabContentsContainer::SetReservedContentsRect(
32 const gfx::Rect& reserved_rect) {
33 cached_reserved_rect_ = reserved_rect;
34 // TODO(anicolao): find out what this is supposed to be used for and ensure
35 // it's OK for touch.
36 }
37
31 void TabContentsContainer::ChangeTabContents(TabContents* contents) { 38 void TabContentsContainer::ChangeTabContents(TabContents* contents) {
32 if (tab_contents_) { 39 if (tab_contents_) {
33 views::View *v = static_cast<TabContentsViewViews*>(tab_contents_->view()); 40 views::View *v = static_cast<TabContentsViewViews*>(tab_contents_->view());
34 RemoveChildView(v); 41 RemoveChildView(v);
35 tab_contents_->WasHidden(); 42 tab_contents_->WasHidden();
36 RemoveObservers(); 43 RemoveObservers();
37 } 44 }
38 tab_contents_ = contents; 45 tab_contents_ = contents;
39 // When detaching the last tab of the browser ChangeTabContents is invoked 46 // When detaching the last tab of the browser ChangeTabContents is invoked
40 // with NULL. Don't attempt to do anything in that case. 47 // with NULL. Don't attempt to do anything in that case.
41 if (tab_contents_) { 48 if (tab_contents_) {
42 views::View *v = static_cast<TabContentsViewViews*>(contents->view()); 49 views::View *v = static_cast<TabContentsViewViews*>(contents->view());
43 AddChildView(v); 50 AddChildView(v);
44 SetLayoutManager(new views::FillLayout()); 51 SetLayoutManager(new views::FillLayout());
45 Layout(); 52 Layout();
46 AddObservers(); 53 AddObservers();
47 } 54 }
48 } 55 }
49 56
50 void TabContentsContainer::TabContentsFocused(TabContents* tab_contents) { 57 void TabContentsContainer::TabContentsFocused(TabContents* tab_contents) {
51 } 58 }
52 59
53 void TabContentsContainer::SetFastResize(bool fast_resize) { 60 void TabContentsContainer::SetFastResize(bool fast_resize) {
54 } 61 }
55 62
56 void TabContentsContainer::RenderViewHostChanged(RenderViewHost* old_host, 63 void TabContentsContainer::RenderViewHostChanged(RenderViewHost* old_host,
57 RenderViewHost* new_host) { 64 RenderViewHost* new_host) {
58 NOTIMPLEMENTED(); // TODO(anicolao) 65 NOTIMPLEMENTED(); // TODO(anicolao)
59 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698