summaryrefslogtreecommitdiffstats
path: root/chrome/browser/command_updater.h
diff options
context:
space:
mode:
authoraltimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 10:05:33 +0000
committeraltimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 10:05:33 +0000
commitef5570297e5d4e5f40089d34c0e68e7607562933 (patch)
treecadeed4d23f914831f2a32fe179416d93bc704fc /chrome/browser/command_updater.h
parentdd442d7460ada03ca97904c2de098b57c94d0475 (diff)
downloadchromium_src-ef5570297e5d4e5f40089d34c0e68e7607562933.zip
chromium_src-ef5570297e5d4e5f40089d34c0e68e7607562933.tar.gz
chromium_src-ef5570297e5d4e5f40089d34c0e68e7607562933.tar.bz2
Re-factor location bar/toolbar code to get rid of the browser dependency. This CL is needed to allow code reusing by captive portal view, which will show web content using DomView.
BUG=chromium-os:22630 TEST=browser_tests,unit_tests works Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=126959 Reverted because of a misprint which was hidden by overloaded method (ExecuteCommand): http://codereview.chromium.org/9703099/ Review URL: http://codereview.chromium.org/9479008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/command_updater.h')
-rw-r--r--chrome/browser/command_updater.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/chrome/browser/command_updater.h b/chrome/browser/command_updater.h
index 024658d..80d8350 100644
--- a/chrome/browser/command_updater.h
+++ b/chrome/browser/command_updater.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/hash_tables.h"
+#include "webkit/glue/window_open_disposition.h"
////////////////////////////////////////////////////////////////////////////////
//
@@ -23,8 +24,11 @@ class CommandUpdater {
// when needed.
class CommandUpdaterDelegate {
public:
- // Perform the action associated with the command with the specified ID.
- virtual void ExecuteCommand(int id) = 0;
+ // Performs the action associated with the command with the specified ID and
+ // using the given disposition.
+ virtual void ExecuteCommandWithDisposition(
+ int id,
+ WindowOpenDisposition disposition) = 0;
protected:
virtual ~CommandUpdaterDelegate();
@@ -42,11 +46,19 @@ class CommandUpdater {
// supported by this updater.
bool IsCommandEnabled(int id) const;
- // Performs the action associated with this command ID.
+ // Performs the action associated with this command ID using CURRENT_TAB
+ // disposition.
// TODO(beng): get rid of this since it's effectively just a pass-thru and the
// call sites would be better off using more well defined delegate interfaces.
void ExecuteCommand(int id);
+ // Performs the action associated with this command ID using the given
+ // disposition.
+ // TODO(altimofeev): refactor the interface to provide more flexible and
+ // explicit way for passing command specific arguments. See
+ // NotificationDetails class for the possible implementation ideas.
+ void ExecuteCommandWithDisposition(int id, WindowOpenDisposition disposition);
+
// An Observer interface implemented by objects that want to be informed when
// the state of a particular command ID is modified.
class CommandObserver {