Add a minor text member to ui::MenuModel.
[chromium-blink-merge.git] / chrome / browser / ui / views / native_focus_tracker_views.cc
blob07f362d26d922788196737644e24cd207e14022e
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/views/native_focus_tracker_views.h"
7 NativeFocusTrackerViews::NativeFocusTrackerViews(NativeFocusTrackerHost* host)
8 : host_(host) {
9 views::WidgetFocusManager::GetInstance()->AddFocusChangeListener(this);
12 NativeFocusTrackerViews::~NativeFocusTrackerViews() {
13 views::WidgetFocusManager::GetInstance()->RemoveFocusChangeListener(this);
16 void NativeFocusTrackerViews::OnNativeFocusChange(
17 gfx::NativeView focused_before,
18 gfx::NativeView focused_now) {
19 host_->SetBrowser(GetBrowserForNativeView(focused_now));
22 // static
23 NativeFocusTracker* NativeFocusTracker::Create(NativeFocusTrackerHost* host) {
24 return new NativeFocusTrackerViews(host);