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

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

Issue 1654723002: Enable showing the toolkit-views simplified fullscreen UI on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150112-MacViews-NewFullscreenBubble
Patch Set: msw comments Created 4 years, 10 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 2646 matching lines...) Expand 10 before | Expand all | Expand 10 after
2657 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2657 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2658 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2658 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2659 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr)); 2659 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr));
2660 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2660 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2661 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2661 top_arrow_height = infobar_top.y() - icon_bottom.y();
2662 } 2662 }
2663 return top_arrow_height; 2663 return top_arrow_height;
2664 } 2664 }
2665 2665
2666 /////////////////////////////////////////////////////////////////////////////// 2666 ///////////////////////////////////////////////////////////////////////////////
2667 // BrowserView, ExclusiveAccessContext overrides 2667 // BrowserView, ExclusiveAccessContext overrides
msw 2016/02/03 22:11:56 optional nit: "overrides:" (or "implementation:");
tapted 2016/02/03 22:27:52 Done. (went with `implementation:` - I think it's
2668 Profile* BrowserView::GetProfile() { 2668 Profile* BrowserView::GetProfile() {
2669 return browser_->profile(); 2669 return browser_->profile();
2670 } 2670 }
2671 2671
2672 WebContents* BrowserView::GetActiveWebContents() { 2672 WebContents* BrowserView::GetActiveWebContents() {
2673 return browser_->tab_strip_model()->GetActiveWebContents(); 2673 return browser_->tab_strip_model()->GetActiveWebContents();
2674 } 2674 }
2675 2675
2676 void BrowserView::UnhideDownloadShelf() { 2676 void BrowserView::UnhideDownloadShelf() {
2677 GetDownloadShelf()->Unhide(); 2677 GetDownloadShelf()->Unhide();
2678 } 2678 }
2679 2679
2680 void BrowserView::HideDownloadShelf() { 2680 void BrowserView::HideDownloadShelf() {
2681 GetDownloadShelf()->Hide(); 2681 GetDownloadShelf()->Hide();
2682 StatusBubble* statusBubble = GetStatusBubble(); 2682 StatusBubble* statusBubble = GetStatusBubble();
2683 if (statusBubble) 2683 if (statusBubble)
2684 statusBubble->Hide(); 2684 statusBubble->Hide();
2685 } 2685 }
2686 2686
2687 /////////////////////////////////////////////////////////////////////////////// 2687 ///////////////////////////////////////////////////////////////////////////////
2688 // BrowserView, ExclusiveAccessBubbleViewsContext overrides 2688 // BrowserView, ExclusiveAccessBubbleViewsContext overrides
msw 2016/02/03 22:11:56 optional nit: "overrides:" (or "implementation:");
tapted 2016/02/03 22:27:53 Done.
2689 ExclusiveAccessManager* BrowserView::GetExclusiveAccessManager() { 2689 ExclusiveAccessManager* BrowserView::GetExclusiveAccessManager() {
2690 return browser_->exclusive_access_manager(); 2690 return browser_->exclusive_access_manager();
2691 } 2691 }
2692 2692
2693 views::Widget* BrowserView::GetBubbleAssociatedWidget() {
2694 return GetWidget();
2695 }
2696
2697 ui::AcceleratorProvider* BrowserView::GetAcceleratorProvider() {
2698 return this;
2699 }
2700
2701 gfx::NativeView BrowserView::GetBubbleParentView() const {
2702 return GetWidget()->GetNativeView();
2703 }
2704
2705 gfx::Point BrowserView::GetCursorPointInParent() const {
2706 gfx::Point cursor_pos = gfx::Screen::GetScreen()->GetCursorScreenPoint();
2707 views::View::ConvertPointFromScreen(GetWidget()->GetRootView(), &cursor_pos);
2708 return cursor_pos;
2709 }
2710
2711 gfx::Rect BrowserView::GetClientAreaBoundsInScreen() const {
2712 return GetWidget()->GetClientAreaBoundsInScreen();
2713 }
2714
2693 bool BrowserView::IsImmersiveModeEnabled() { 2715 bool BrowserView::IsImmersiveModeEnabled() {
2694 return immersive_mode_controller()->IsEnabled(); 2716 return immersive_mode_controller()->IsEnabled();
2695 } 2717 }
2696 2718
2697 views::Widget* BrowserView::GetBubbleAssociatedWidget() {
2698 return GetWidget();
2699 }
2700
2701 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { 2719 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() {
2702 return top_container_->GetBoundsInScreen(); 2720 return top_container_->GetBoundsInScreen();
2703 } 2721 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698