summaryrefslogtreecommitdiffstats
path: root/ash/launcher
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 20:30:12 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 20:30:12 +0000
commit8676f04721b1a08e3ac16b3d33737e7d8706b402 (patch)
treeda7af576aae72bb1ea3a662ba07544bbac1df5b4 /ash/launcher
parent72a22eb913ab85b47971038acc7ca7117a96d633 (diff)
downloadchromium_src-8676f04721b1a08e3ac16b3d33737e7d8706b402.zip
chromium_src-8676f04721b1a08e3ac16b3d33737e7d8706b402.tar.gz
chromium_src-8676f04721b1a08e3ac16b3d33737e7d8706b402.tar.bz2
Makes the shelf visible if the launcher/status has focus.
BUG=120706 TEST=see bug, also covered by unit tests R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/9890001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129679 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher')
-rw-r--r--ash/launcher/launcher.cc11
-rw-r--r--ash/launcher/launcher.h1
2 files changed, 10 insertions, 2 deletions
diff --git a/ash/launcher/launcher.cc b/ash/launcher/launcher.cc
index 782365c..5516442 100644
--- a/ash/launcher/launcher.cc
+++ b/ash/launcher/launcher.cc
@@ -40,9 +40,12 @@ class Launcher::DelegateView : public views::WidgetDelegate,
void SetStatusWidth(int width);
int status_width() const { return status_width_; }
- void set_focus_cycler(const internal::FocusCycler* focus_cycler) {
+ void set_focus_cycler(internal::FocusCycler* focus_cycler) {
focus_cycler_ = focus_cycler;
}
+ internal::FocusCycler* focus_cycler() {
+ return focus_cycler_;
+ }
// views::View overrides
virtual gfx::Size GetPreferredSize() OVERRIDE;
@@ -67,7 +70,7 @@ class Launcher::DelegateView : public views::WidgetDelegate,
// Width of the status area.
int status_width_;
- const internal::FocusCycler* focus_cycler_;
+ internal::FocusCycler* focus_cycler_;
DISALLOW_COPY_AND_ASSIGN(DelegateView);
};
@@ -148,6 +151,10 @@ void Launcher::SetFocusCycler(internal::FocusCycler* focus_cycler) {
focus_cycler->AddWidget(widget_.get());
}
+internal::FocusCycler* Launcher::GetFocusCycler() {
+ return delegate_view_->focus_cycler();
+}
+
void Launcher::SetPaintsBackground(
bool value,
internal::BackgroundAnimator::ChangeType change_type) {
diff --git a/ash/launcher/launcher.h b/ash/launcher/launcher.h
index 8578b95..ebc56b8 100644
--- a/ash/launcher/launcher.h
+++ b/ash/launcher/launcher.h
@@ -40,6 +40,7 @@ class ASH_EXPORT Launcher : public internal::BackgroundAnimatorDelegate {
// Sets the focus cycler. Also adds the launcher to the cycle.
void SetFocusCycler(internal::FocusCycler* focus_cycler);
+ internal::FocusCycler* GetFocusCycler();
// Sets whether the launcher paints a background. Default is false, but is set
// to true if a window overlaps the shelf.