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

Side by Side Diff: chrome/browser/ui/views/frame/contents_container.cc

Issue 14589016: Unit test for BrowserViewLayout that does not depend on BrowserView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: BrowserViewLayout owns its delegate Created 7 years, 7 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/frame/contents_container.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/frame/contents_container.h" 5 #include "chrome/browser/ui/views/frame/contents_container.h"
6 6
7 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_contents.h"
8 #include "ui/views/controls/webview/webview.h" 8 #include "ui/views/controls/webview/webview.h"
9 9
10 // static 10 // static
11 const char ContentsContainer::kViewClassName[] = "ContentsContainer"; 11 const char ContentsContainer::kViewClassName[] = "ContentsContainer";
12 12
13 ContentsContainer::ContentsContainer(views::WebView* active) 13 ContentsContainer::ContentsContainer(views::View* active_web_view)
14 : active_(active), 14 : active_(active_web_view),
15 active_top_margin_(0) { 15 active_top_margin_(0) {
16 AddChildView(active_); 16 AddChildView(active_);
17 } 17 }
18 18
19 ContentsContainer::~ContentsContainer() { 19 ContentsContainer::~ContentsContainer() {
20 } 20 }
21 21
22 void ContentsContainer::SetActive(views::WebView* overlay) { 22 void ContentsContainer::SetActive(views::WebView* overlay) {
23 DCHECK(overlay); 23 DCHECK(overlay);
24 active_ = overlay; 24 active_ = overlay;
(...skipping 18 matching lines...) Expand all
43 active_->SetBounds(0, content_y, width(), content_height); 43 active_->SetBounds(0, content_y, width(), content_height);
44 44
45 // Need to invoke views::View in case any views whose bounds didn't change 45 // Need to invoke views::View in case any views whose bounds didn't change
46 // still need a layout. 46 // still need a layout.
47 views::View::Layout(); 47 views::View::Layout();
48 } 48 }
49 49
50 const char* ContentsContainer::GetClassName() const { 50 const char* ContentsContainer::GetClassName() const {
51 return kViewClassName; 51 return kViewClassName;
52 } 52 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/contents_container.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698