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

Unified Diff: chrome/browser/chromeos/status_area_view.h

Issue 215025: Make chromeos build use shared object to load battery... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/chromeos/DEPS ('k') | chrome/browser/chromeos/status_area_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status_area_view.h
===================================================================
--- chrome/browser/chromeos/status_area_view.h (revision 26831)
+++ chrome/browser/chromeos/status_area_view.h (working copy)
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_STATUS_AREA_VIEW_H_
#include "base/basictypes.h"
+#include "third_party/chromeos_power/chromeos_power.h"
#include "views/controls/menu/simple_menu_model.h"
#include "views/controls/menu/view_menu_delegate.h"
#include "views/view.h"
@@ -55,7 +56,15 @@
// views::ViewMenuDelegate implementation.
virtual void RunMenu(views::View* source, const gfx::Point& pt,
gfx::NativeView hwnd);
+ // Called whenever the battery status changes.
+ void PowerStatusChanged(const chromeos::PowerStatus& status);
+ static void LoadPowerLibrary();
+ // Called whenever the battery status changes. Dispatches to
+ // PowerStatusChanged() instance method.
+ static void PowerStatusChangedHandler(
+ void* object, const chromeos::PowerStatus& status);
+
// The browser window that owns us.
Browser* browser_;
@@ -65,8 +74,15 @@
scoped_ptr<views::SimpleMenuModel> app_menu_contents_;
scoped_ptr<views::SimpleMenuModel> options_menu_contents_;
scoped_ptr<views::Menu2> app_menu_menu_;
+ // A reference to the battery power api, to allow callbacks when the
+ // battery status changes.
+ chromeos::PowerStatusConnection power_status_connection_;
static OpenTabsMode open_tabs_mode_;
+ // Handle to result of dlopen() of the power shared object.
+ static void* power_library_;
+ // True if there was an error loading the power shared object.
+ static bool power_library_error_;
DISALLOW_COPY_AND_ASSIGN(StatusAreaView);
};
« no previous file with comments | « chrome/browser/chromeos/DEPS ('k') | chrome/browser/chromeos/status_area_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698