| OLD | NEW |
| 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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 preview_container_ = NULL; | 1314 preview_container_ = NULL; |
| 1315 } | 1315 } |
| 1316 | 1316 |
| 1317 gfx::Rect BrowserView::GetInstantBounds() { | 1317 gfx::Rect BrowserView::GetInstantBounds() { |
| 1318 return contents_->GetPreviewBounds(); | 1318 return contents_->GetPreviewBounds(); |
| 1319 } | 1319 } |
| 1320 | 1320 |
| 1321 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( | 1321 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( |
| 1322 const gfx::Rect& bounds) { | 1322 const gfx::Rect& bounds) { |
| 1323 #if defined(USE_AURA) | 1323 #if defined(USE_AURA) |
| 1324 gfx::Size window_size = gfx::Screen::GetMonitorAreaNearestWindow( | 1324 gfx::Size window_size = gfx::Screen::GetMonitorNearestWindow( |
| 1325 GetWidget()->GetNativeView()).size(); | 1325 GetWidget()->GetNativeView()).size(); |
| 1326 return browser::DispositionForPopupBounds( | 1326 return browser::DispositionForPopupBounds( |
| 1327 bounds, window_size.width(), window_size.height()); | 1327 bounds, window_size.width(), window_size.height()); |
| 1328 #else | 1328 #else |
| 1329 return NEW_POPUP; | 1329 return NEW_POPUP; |
| 1330 #endif | 1330 #endif |
| 1331 } | 1331 } |
| 1332 | 1332 |
| 1333 FindBar* BrowserView::CreateFindBar() { | 1333 FindBar* BrowserView::CreateFindBar() { |
| 1334 return browser::CreateFindBar(this); | 1334 return browser::CreateFindBar(this); |
| (...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2485 return; | 2485 return; |
| 2486 | 2486 |
| 2487 PasswordGenerationBubbleView* bubble = | 2487 PasswordGenerationBubbleView* bubble = |
| 2488 new PasswordGenerationBubbleView(bounds, | 2488 new PasswordGenerationBubbleView(bounds, |
| 2489 this, | 2489 this, |
| 2490 web_contents->GetRenderViewHost()); | 2490 web_contents->GetRenderViewHost()); |
| 2491 views::BubbleDelegateView::CreateBubble(bubble); | 2491 views::BubbleDelegateView::CreateBubble(bubble); |
| 2492 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2492 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
| 2493 bubble->Show(); | 2493 bubble->Show(); |
| 2494 } | 2494 } |
| OLD | NEW |