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

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

Issue 12754010: Move immersive_mode_controller into c/b/ui/views/frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/top_container_view.h" 5 #include "chrome/browser/ui/views/frame/top_container_view.h"
6 6
7 #include "chrome/browser/ui/views/frame/browser_frame.h" 7 #include "chrome/browser/ui/views/frame/browser_frame.h"
8 #include "chrome/browser/ui/views/frame/browser_view.h" 8 #include "chrome/browser/ui/views/frame/browser_view.h"
9 #include "chrome/browser/ui/views/immersive_mode_controller.h" 9 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
10 10
11 TopContainerView::TopContainerView(BrowserView* browser_view) 11 TopContainerView::TopContainerView(BrowserView* browser_view)
12 : browser_view_(browser_view), 12 : browser_view_(browser_view),
13 focus_manager_(browser_view->GetFocusManager()) { 13 focus_manager_(browser_view->GetFocusManager()) {
14 focus_manager_->AddFocusChangeListener(this); 14 focus_manager_->AddFocusChangeListener(this);
15 } 15 }
16 16
17 TopContainerView::~TopContainerView() { 17 TopContainerView::~TopContainerView() {
18 focus_manager_->RemoveFocusChangeListener(this); 18 focus_manager_->RemoveFocusChangeListener(this);
19 } 19 }
(...skipping 20 matching lines...) Expand all
40 40
41 void TopContainerView::OnDidChangeFocus(View* focused_before, 41 void TopContainerView::OnDidChangeFocus(View* focused_before,
42 View* focused_now) { 42 View* focused_now) {
43 // If one of this view's children had focus before, but doesn't have focus 43 // If one of this view's children had focus before, but doesn't have focus
44 // now, we may want to slide out the top views in immersive fullscreen. 44 // now, we may want to slide out the top views in immersive fullscreen.
45 if (browser_view_->immersive_mode_controller()->enabled() && 45 if (browser_view_->immersive_mode_controller()->enabled() &&
46 Contains(focused_before) && 46 Contains(focused_before) &&
47 !Contains(focused_now)) 47 !Contains(focused_now))
48 browser_view_->immersive_mode_controller()->OnRevealViewLostFocus(); 48 browser_view_->immersive_mode_controller()->OnRevealViewLostFocus();
49 } 49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698