Chromium Code Reviews| 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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 602 chrome::MaybeShowInvertBubbleView(browser_.get(), contents_); | 602 chrome::MaybeShowInvertBubbleView(browser_.get(), contents_); |
| 603 } | 603 } |
| 604 | 604 |
| 605 void BrowserView::ShowInactive() { | 605 void BrowserView::ShowInactive() { |
| 606 if (frame_->IsVisible()) | 606 if (frame_->IsVisible()) |
| 607 return; | 607 return; |
| 608 CreateLauncherIcon(); | 608 CreateLauncherIcon(); |
| 609 frame_->ShowInactive(); | 609 frame_->ShowInactive(); |
| 610 } | 610 } |
| 611 | 611 |
| 612 void BrowserView::Hide() { | |
| 613 if (!frame_->IsVisible()) | |
| 614 return; | |
| 615 frame_->Hide(); | |
|
benwells
2012/10/16 05:54:55
Is this implementation used by anything? If not, i
jeremya
2012/10/16 06:31:32
Good point. Replaced with a comment.
| |
| 616 } | |
| 617 | |
| 612 void BrowserView::SetBounds(const gfx::Rect& bounds) { | 618 void BrowserView::SetBounds(const gfx::Rect& bounds) { |
| 613 ExitFullscreen(); | 619 ExitFullscreen(); |
| 614 GetWidget()->SetBounds(bounds); | 620 GetWidget()->SetBounds(bounds); |
| 615 } | 621 } |
| 616 | 622 |
| 617 void BrowserView::Close() { | 623 void BrowserView::Close() { |
| 618 frame_->Close(); | 624 frame_->Close(); |
| 619 } | 625 } |
| 620 | 626 |
| 621 void BrowserView::Activate() { | 627 void BrowserView::Activate() { |
| (...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2680 | 2686 |
| 2681 Browser* modal_browser = | 2687 Browser* modal_browser = |
| 2682 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2688 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2683 if (modal_browser && (browser_ != modal_browser)) { | 2689 if (modal_browser && (browser_ != modal_browser)) { |
| 2684 modal_browser->window()->FlashFrame(true); | 2690 modal_browser->window()->FlashFrame(true); |
| 2685 modal_browser->window()->Activate(); | 2691 modal_browser->window()->Activate(); |
| 2686 } | 2692 } |
| 2687 | 2693 |
| 2688 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2694 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2689 } | 2695 } |
| OLD | NEW |