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

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

Issue 789403002: Rename fullscreen_exit_bubble_* to exclusive_access_bubble_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated based on CR comments Created 6 years 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
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_layout.h" 5 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
11 #include "chrome/browser/ui/browser_window.h" 11 #include "chrome/browser/ui/browser_window.h"
12 #include "chrome/browser/ui/find_bar/find_bar.h" 12 #include "chrome/browser/ui/find_bar/find_bar.h"
13 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 13 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
14 #include "chrome/browser/ui/search/search_model.h" 14 #include "chrome/browser/ui/search/search_model.h"
15 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 15 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
16 #include "chrome/browser/ui/views/download/download_shelf_view.h" 16 #include "chrome/browser/ui/views/download/download_shelf_view.h"
17 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h"
17 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h" 18 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h"
18 #include "chrome/browser/ui/views/frame/contents_layout_manager.h" 19 #include "chrome/browser/ui/views/frame/contents_layout_manager.h"
19 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" 20 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
20 #include "chrome/browser/ui/views/frame/top_container_view.h" 21 #include "chrome/browser/ui/views/frame/top_container_view.h"
21 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h"
22 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" 22 #include "chrome/browser/ui/views/infobars/infobar_container_view.h"
23 #include "chrome/browser/ui/views/tabs/tab_strip.h" 23 #include "chrome/browser/ui/views/tabs/tab_strip.h"
24 #include "components/web_modal/web_contents_modal_dialog_host.h" 24 #include "components/web_modal/web_contents_modal_dialog_host.h"
25 #include "ui/base/hit_test.h" 25 #include "ui/base/hit_test.h"
26 #include "ui/gfx/point.h" 26 #include "ui/gfx/point.h"
27 #include "ui/gfx/scrollbar_size.h" 27 #include "ui/gfx/scrollbar_size.h"
28 #include "ui/gfx/size.h" 28 #include "ui/gfx/size.h"
29 #include "ui/views/controls/webview/webview.h" 29 #include "ui/views/controls/webview/webview.h"
30 #include "ui/views/widget/widget.h" 30 #include "ui/views/widget/widget.h"
31 #include "ui/views/window/client_view.h" 31 #include "ui/views/window/client_view.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // must be laid out within, and that code depends on the 347 // must be laid out within, and that code depends on the
348 // TabContentsContainer's bounds being up to date. 348 // TabContentsContainer's bounds being up to date.
349 if (browser()->HasFindBarController()) { 349 if (browser()->HasFindBarController()) {
350 browser()->GetFindBarController()->find_bar()->MoveWindowIfNecessary( 350 browser()->GetFindBarController()->find_bar()->MoveWindowIfNecessary(
351 gfx::Rect()); 351 gfx::Rect());
352 } 352 }
353 353
354 // Adjust the fullscreen exit bubble bounds for |top_container_|'s new bounds. 354 // Adjust the fullscreen exit bubble bounds for |top_container_|'s new bounds.
355 // This makes the fullscreen exit bubble look like it animates with 355 // This makes the fullscreen exit bubble look like it animates with
356 // |top_container_| in immersive fullscreen. 356 // |top_container_| in immersive fullscreen.
357 FullscreenExitBubbleViews* fullscreen_exit_bubble = 357 ExclusiveAccessBubbleViews* exclusive_access_bubble =
358 delegate_->GetFullscreenExitBubble(); 358 delegate_->GetExclusiveAccessBubble();
359 if (fullscreen_exit_bubble) 359 if (exclusive_access_bubble)
360 fullscreen_exit_bubble->RepositionIfVisible(); 360 exclusive_access_bubble->RepositionIfVisible();
361 361
362 // Adjust any hosted dialogs if the browser's dialog hosting bounds changed. 362 // Adjust any hosted dialogs if the browser's dialog hosting bounds changed.
363 const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()), 363 const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()),
364 dialog_host_->GetMaximumDialogSize()); 364 dialog_host_->GetMaximumDialogSize());
365 if (latest_dialog_bounds_ != dialog_bounds) { 365 if (latest_dialog_bounds_ != dialog_bounds) {
366 latest_dialog_bounds_ = dialog_bounds; 366 latest_dialog_bounds_ = dialog_bounds;
367 dialog_host_->NotifyPositionRequiresUpdate(); 367 dialog_host_->NotifyPositionRequiresUpdate();
368 } 368 }
369 } 369 }
370 370
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 return bottom; 540 return bottom;
541 } 541 }
542 542
543 bool BrowserViewLayout::InfobarVisible() const { 543 bool BrowserViewLayout::InfobarVisible() const {
544 // Cast to a views::View to access GetPreferredSize(). 544 // Cast to a views::View to access GetPreferredSize().
545 views::View* infobar_container = infobar_container_; 545 views::View* infobar_container = infobar_container_;
546 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. 546 // NOTE: Can't check if the size IsEmpty() since it's always 0-width.
547 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && 547 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) &&
548 (infobar_container->GetPreferredSize().height() != 0); 548 (infobar_container->GetPreferredSize().height() != 0);
549 } 549 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/browser_view_layout_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698