| 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 void BrowserView::ExitFullscreen() { | 761 void BrowserView::ExitFullscreen() { |
| 762 if (!IsFullscreen()) | 762 if (!IsFullscreen()) |
| 763 return; // Nothing to do. | 763 return; // Nothing to do. |
| 764 | 764 |
| 765 ProcessFullscreen(false, GURL(), FEB_TYPE_NONE); | 765 ProcessFullscreen(false, GURL(), FEB_TYPE_NONE); |
| 766 } | 766 } |
| 767 | 767 |
| 768 void BrowserView::UpdateFullscreenExitBubbleContent( | 768 void BrowserView::UpdateFullscreenExitBubbleContent( |
| 769 const GURL& url, | 769 const GURL& url, |
| 770 FullscreenExitBubbleType bubble_type) { | 770 FullscreenExitBubbleType bubble_type) { |
| 771 if (fullscreen_bubble_.get()) | 771 if (bubble_type == FEB_TYPE_NONE) { |
| 772 fullscreen_bubble_.reset(); |
| 773 } else if (fullscreen_bubble_.get()) { |
| 772 fullscreen_bubble_->UpdateContent(url, bubble_type); | 774 fullscreen_bubble_->UpdateContent(url, bubble_type); |
| 775 } else { |
| 776 fullscreen_bubble_.reset(new FullscreenExitBubbleViews( |
| 777 GetWidget(), browser_.get(), url, bubble_type)); |
| 778 } |
| 773 } | 779 } |
| 774 | 780 |
| 775 bool BrowserView::IsFullscreen() const { | 781 bool BrowserView::IsFullscreen() const { |
| 776 return frame_->IsFullscreen(); | 782 return frame_->IsFullscreen(); |
| 777 } | 783 } |
| 778 | 784 |
| 779 bool BrowserView::IsFullscreenBubbleVisible() const { | 785 bool BrowserView::IsFullscreenBubbleVisible() const { |
| 780 return fullscreen_bubble_ != NULL; | 786 return fullscreen_bubble_ != NULL; |
| 781 } | 787 } |
| 782 | 788 |
| (...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2408 return; | 2414 return; |
| 2409 | 2415 |
| 2410 PasswordGenerationBubbleView* bubble = | 2416 PasswordGenerationBubbleView* bubble = |
| 2411 new PasswordGenerationBubbleView(bounds, | 2417 new PasswordGenerationBubbleView(bounds, |
| 2412 this, | 2418 this, |
| 2413 web_contents->GetRenderViewHost()); | 2419 web_contents->GetRenderViewHost()); |
| 2414 views::BubbleDelegateView::CreateBubble(bubble); | 2420 views::BubbleDelegateView::CreateBubble(bubble); |
| 2415 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2421 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
| 2416 bubble->Show(); | 2422 bubble->Show(); |
| 2417 } | 2423 } |
| OLD | NEW |