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

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

Issue 10258007: Make so in metro mode popups are background tabs (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « no previous file | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 return contents_->GetPreviewBounds(); 1302 return contents_->GetPreviewBounds();
1303 } 1303 }
1304 1304
1305 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( 1305 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds(
1306 const gfx::Rect& bounds) { 1306 const gfx::Rect& bounds) {
1307 #if defined(USE_AURA) 1307 #if defined(USE_AURA)
1308 gfx::Size window_size = gfx::Screen::GetMonitorNearestWindow( 1308 gfx::Size window_size = gfx::Screen::GetMonitorNearestWindow(
1309 GetWidget()->GetNativeView()).size(); 1309 GetWidget()->GetNativeView()).size();
1310 return browser::DispositionForPopupBounds( 1310 return browser::DispositionForPopupBounds(
1311 bounds, window_size.width(), window_size.height()); 1311 bounds, window_size.width(), window_size.height());
1312 #elif defined(OS_WIN)
1313 return (base::win::GetMetroModule() == NULL) ? NEW_POPUP : NEW_BACKGROUND_TAB;
sky 2012/04/27 23:34:53 Add a comment as to why we're doing this.
1312 #else 1314 #else
1313 return NEW_POPUP; 1315 return NEW_POPUP;
1314 #endif 1316 #endif
1315 } 1317 }
1316 1318
1317 FindBar* BrowserView::CreateFindBar() { 1319 FindBar* BrowserView::CreateFindBar() {
1318 return browser::CreateFindBar(this); 1320 return browser::CreateFindBar(this);
1319 } 1321 }
1320 1322
1321 #if defined(OS_CHROMEOS) 1323 #if defined(OS_CHROMEOS)
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 return; 2471 return;
2470 2472
2471 PasswordGenerationBubbleView* bubble = 2473 PasswordGenerationBubbleView* bubble =
2472 new PasswordGenerationBubbleView(bounds, 2474 new PasswordGenerationBubbleView(bounds,
2473 this, 2475 this,
2474 web_contents->GetRenderViewHost()); 2476 web_contents->GetRenderViewHost());
2475 views::BubbleDelegateView::CreateBubble(bubble); 2477 views::BubbleDelegateView::CreateBubble(bubble);
2476 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); 2478 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
2477 bubble->Show(); 2479 bubble->Show();
2478 } 2480 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698