OLD | NEW |
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/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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 // BrowserView, views::WidgetDelegate implementation: | 1493 // BrowserView, views::WidgetDelegate implementation: |
1494 | 1494 |
1495 bool BrowserView::CanResize() const { | 1495 bool BrowserView::CanResize() const { |
1496 return true; | 1496 return true; |
1497 } | 1497 } |
1498 | 1498 |
1499 bool BrowserView::CanMaximize() const { | 1499 bool BrowserView::CanMaximize() const { |
1500 return true; | 1500 return true; |
1501 } | 1501 } |
1502 | 1502 |
| 1503 bool BrowserView::CanMinimize() const { |
| 1504 return true; |
| 1505 } |
| 1506 |
1503 bool BrowserView::CanActivate() const { | 1507 bool BrowserView::CanActivate() const { |
1504 if (!AppModalDialogQueue::GetInstance()->active_dialog() || | 1508 if (!AppModalDialogQueue::GetInstance()->active_dialog() || |
1505 !AppModalDialogQueue::GetInstance()->active_dialog()->native_dialog()) | 1509 !AppModalDialogQueue::GetInstance()->active_dialog()->native_dialog()) |
1506 return true; | 1510 return true; |
1507 | 1511 |
1508 #if defined(USE_AURA) && defined(OS_CHROMEOS) | 1512 #if defined(USE_AURA) && defined(OS_CHROMEOS) |
1509 // On Aura window manager controls all windows so settings focus via PostTask | 1513 // On Aura window manager controls all windows so settings focus via PostTask |
1510 // will make only worse because posted task will keep trying to steal focus. | 1514 // will make only worse because posted task will keep trying to steal focus. |
1511 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 1515 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
1512 #else | 1516 #else |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2517 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2521 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2518 gfx::Point icon_bottom( | 2522 gfx::Point icon_bottom( |
2519 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2523 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2520 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2524 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2521 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2525 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2522 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2526 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2523 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2527 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2524 } | 2528 } |
2525 return top_arrow_height; | 2529 return top_arrow_height; |
2526 } | 2530 } |
OLD | NEW |