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

Side by Side Diff: chrome/browser/ui/ash/user_action_handler.cc

Issue 11451019: Remove TabContents from ui/ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ash/user_action_handler.h" 5 #include "chrome/browser/ui/ash/user_action_handler.h"
6 6
7 #include "ash/wm/window_util.h" 7 #include "ash/wm/window_util.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 10 #include "chrome/browser/ui/browser_tabstrip.h"
11 #include "chrome/browser/ui/browser_window.h" 11 #include "chrome/browser/ui/browser_window.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents.h"
13 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
14 13
15 // Returns the currently-active WebContents belonging to the active browser, or 14 // Returns the currently-active WebContents belonging to the active browser, or
16 // NULL if there's no currently-active browser. 15 // NULL if there's no currently-active browser.
17 content::WebContents* GetActiveWebContents() { 16 content::WebContents* GetActiveWebContents() {
18 Browser* browser = chrome::FindLastActiveWithHostDesktopType( 17 Browser* browser = chrome::FindLastActiveWithHostDesktopType(
19 chrome::HOST_DESKTOP_TYPE_ASH); 18 chrome::HOST_DESKTOP_TYPE_ASH);
20 if (!browser) 19 if (!browser)
21 return NULL; 20 return NULL;
22 if (!ash::wm::IsActiveWindow(browser->window()->GetNativeWindow())) 21 if (!ash::wm::IsActiveWindow(browser->window()->GetNativeWindow()))
(...skipping 23 matching lines...) Expand all
46 contents->GetController().GoForward(); 45 contents->GetController().GoForward();
47 return true; 46 return true;
48 } 47 }
49 break; 48 break;
50 } 49 }
51 default: 50 default:
52 break; 51 break;
53 } 52 }
54 return false; 53 return false;
55 } 54 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698