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

Side by Side Diff: chrome/browser/ui/cocoa/tabpose_window.mm

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 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
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 #import "chrome/browser/ui/cocoa/tabpose_window.h" 5 #import "chrome/browser/ui/cocoa/tabpose_window.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 !always_show_bookmark_bar; 245 !always_show_bookmark_bar;
246 if (has_detached_bookmark_bar) 246 if (has_detached_bookmark_bar)
247 topOffset += bookmarks::kNTPBookmarkBarHeight; 247 topOffset += bookmarks::kNTPBookmarkBarHeight;
248 248
249 return topOffset; 249 return topOffset;
250 } 250 }
251 251
252 - (int)bottomOffset { 252 - (int)bottomOffset {
253 int bottomOffset = 0; 253 int bottomOffset = 0;
254 TabContentsWrapper* devToolsContents = 254 TabContentsWrapper* devToolsContents =
255 DevToolsWindow::GetDevToolsContents(contents_->tab_contents()); 255 DevToolsWindow::GetDevToolsContents(contents_->web_contents());
256 if (devToolsContents && devToolsContents->tab_contents() && 256 if (devToolsContents && devToolsContents->tab_contents() &&
257 devToolsContents->tab_contents()->GetRenderViewHost() && 257 devToolsContents->tab_contents()->GetRenderViewHost() &&
258 devToolsContents->tab_contents()->GetRenderViewHost()->view()) { 258 devToolsContents->tab_contents()->GetRenderViewHost()->view()) {
259 // The devtool's size might not be up-to-date, but since its height doesn't 259 // The devtool's size might not be up-to-date, but since its height doesn't
260 // change on window resize, and since most users don't use devtools, this is 260 // change on window resize, and since most users don't use devtools, this is
261 // good enough. 261 // good enough.
262 bottomOffset += 262 bottomOffset +=
263 devToolsContents->tab_contents()->GetRenderViewHost()->view()-> 263 devToolsContents->tab_contents()->GetRenderViewHost()->view()->
264 GetViewBounds().height(); 264 GetViewBounds().height();
265 bottomOffset += 1; // :-( Divider line between web contents and devtools. 265 bottomOffset += 1; // :-( Divider line between web contents and devtools.
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 tile.set_tab_contents(contents); 1683 tile.set_tab_contents(contents);
1684 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; 1684 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index];
1685 [thumbLayer setTabContents:contents]; 1685 [thumbLayer setTabContents:contents];
1686 } 1686 }
1687 1687
1688 - (void)tabStripModelDeleted { 1688 - (void)tabStripModelDeleted {
1689 [self close]; 1689 [self close];
1690 } 1690 }
1691 1691
1692 @end 1692 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm ('k') | chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698