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. 4 5 #include "chrome/browser/ui/views/native_focus_tracker_views.h" 6 7 #include "chrome/browser/ui/views/frame/browser_view.h" 8 #include "ui/aura/window.h" 9 10 // static 11 Browser* NativeFocusTrackerViews::GetBrowserForNativeView( 12 gfx::NativeView view) { 13 while (view) { 14 BrowserView* browser_view = 15 BrowserView::GetBrowserViewForNativeWindow(view); 16 if (browser_view) 17 return browser_view->browser(); 18 view = view->parent(); 19 } 20 return NULL; 21 } 22