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

Side by Side Diff: chrome/browser/ui/views/aura/status_area_host_aura.h

Issue 8600001: Fixes bug where clock button wasn't updating in response to a timezone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge and allow NULL Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_VIEWS_AURA_STATUS_AREA_HOST_AURA_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AURA_STATUS_AREA_HOST_AURA_H_
6 #define CHROME_BROWSER_UI_VIEWS_AURA_STATUS_AREA_HOST_AURA_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AURA_STATUS_AREA_HOST_AURA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/browser/chromeos/status/status_area_button.h" 10 #include "chrome/browser/chromeos/status/status_area_button.h"
11 11
12 class StatusAreaView; 12 class StatusAreaView;
13 class TimezoneClockUpdater;
13 14
14 namespace views { 15 namespace views {
16 class Views;
15 class Widget; 17 class Widget;
16 } 18 }
17 19
18 class StatusAreaHostAura : public StatusAreaButton::Delegate { 20 class StatusAreaHostAura : public StatusAreaButton::Delegate {
19 public: 21 public:
20 StatusAreaHostAura(); 22 StatusAreaHostAura();
23 virtual ~StatusAreaHostAura();
24
25 // Returns the view housing the status area. Exposed for testing.
26 const views::View* GetStatusArea() const;
21 27
22 // Instantiates and sets |status_area_view_|, and sets it as the contents of 28 // Instantiates and sets |status_area_view_|, and sets it as the contents of
23 // a new views::Widget |status_area_widget_| which is returned. 29 // a new views::Widget |status_area_widget_| which is returned.
24 // The caller is expected to take ownership of |status_area_widget_|. 30 // The caller is expected to take ownership of |status_area_widget_|.
25 views::Widget* CreateStatusArea(); 31 views::Widget* CreateStatusArea();
26 32
27 // StatusAreaButton::Delegate implementation. 33 // StatusAreaButton::Delegate implementation.
28 virtual bool ShouldExecuteStatusAreaCommand( 34 virtual bool ShouldExecuteStatusAreaCommand(
29 const views::View* button_view, int command_id) const OVERRIDE; 35 const views::View* button_view, int command_id) const OVERRIDE;
30 virtual void ExecuteStatusAreaCommand( 36 virtual void ExecuteStatusAreaCommand(
31 const views::View* button_view, int command_id) OVERRIDE; 37 const views::View* button_view, int command_id) OVERRIDE;
32 virtual gfx::Font GetStatusAreaFont(const gfx::Font& font) const OVERRIDE; 38 virtual gfx::Font GetStatusAreaFont(const gfx::Font& font) const OVERRIDE;
33 virtual StatusAreaButton::TextStyle GetStatusAreaTextStyle() const OVERRIDE; 39 virtual StatusAreaButton::TextStyle GetStatusAreaTextStyle() const OVERRIDE;
34 virtual void ButtonVisibilityChanged(views::View* button_view) OVERRIDE; 40 virtual void ButtonVisibilityChanged(views::View* button_view) OVERRIDE;
35 41
36 private: 42 private:
37 // Owned by caller of CreateStatusArea(). 43 // Owned by caller of CreateStatusArea().
38 views::Widget* status_area_widget_; 44 views::Widget* status_area_widget_;
39 // Owned by status_area_widget_. 45 // Owned by status_area_widget_.
40 StatusAreaView* status_area_view_; 46 StatusAreaView* status_area_view_;
41 47
48 scoped_ptr<TimezoneClockUpdater> timezone_clock_updater_;
49
42 DISALLOW_COPY_AND_ASSIGN(StatusAreaHostAura); 50 DISALLOW_COPY_AND_ASSIGN(StatusAreaHostAura);
43 }; 51 };
44 52
45 #endif // CHROME_BROWSER_UI_VIEWS_AURA_STATUS_AREA_HOST_AURA_H_ 53 #endif // CHROME_BROWSER_UI_VIEWS_AURA_STATUS_AREA_HOST_AURA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/aura/chrome_shell_delegate.cc ('k') | chrome/browser/ui/views/aura/status_area_host_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698