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

Unified Diff: chrome/browser/ui/views/ash/user_action_handler.cc

Issue 10832287: ash: Remove old files and update DEPS whitelist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/ash/user_action_handler.h ('k') | chrome/browser/ui/views/ash/window_positioner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/user_action_handler.cc
diff --git a/chrome/browser/ui/views/ash/user_action_handler.cc b/chrome/browser/ui/views/ash/user_action_handler.cc
deleted file mode 100644
index ce1daa2587c1f854180f86428f99cc7bb4d8402f..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/ash/user_action_handler.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/views/ash/user_action_handler.h"
-
-#include "ash/wm/window_util.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
-#include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
-#include "content/public/browser/web_contents.h"
-
-// Returns the currently-active WebContents belonging to the active browser, or
-// NULL if there's no currently-active browser.
-content::WebContents* GetActiveWebContents() {
- Browser* browser = BrowserList::GetLastActive();
- if (!browser)
- return NULL;
- if (!ash::wm::IsActiveWindow(browser->window()->GetNativeWindow()))
- return NULL;
-
- return chrome::GetActiveWebContents(browser);
-}
-
-UserActionHandler::UserActionHandler() {}
-
-UserActionHandler::~UserActionHandler() {}
-
-bool UserActionHandler::OnUserAction(
- aura::client::UserActionClient::Command command) {
- switch (command) {
- case aura::client::UserActionClient::BACK: {
- content::WebContents* contents = GetActiveWebContents();
- if (contents && contents->GetController().CanGoBack()) {
- contents->GetController().GoBack();
- return true;
- }
- break;
- }
- case aura::client::UserActionClient::FORWARD: {
- content::WebContents* contents = GetActiveWebContents();
- if (contents && contents->GetController().CanGoForward()) {
- contents->GetController().GoForward();
- return true;
- }
- break;
- }
- default:
- break;
- }
- return false;
-}
« no previous file with comments | « chrome/browser/ui/views/ash/user_action_handler.h ('k') | chrome/browser/ui/views/ash/window_positioner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698