diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 20:44:51 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 20:44:51 +0000 |
commit | bd63ce0ad16cab9822d7120bdcf2d5b7353598e3 (patch) | |
tree | aed796bf22fb22cf0a7ff1e6c12b151de3f5bf40 /win8/metro_driver/settings_handler.h | |
parent | 25da1685160963a14710a128977525ea55aee091 (diff) | |
download | chromium_src-bd63ce0ad16cab9822d7120bdcf2d5b7353598e3.zip chromium_src-bd63ce0ad16cab9822d7120bdcf2d5b7353598e3.tar.gz chromium_src-bd63ce0ad16cab9822d7120bdcf2d5b7353598e3.tar.bz2 |
Integrate the Windows 8 code into the Chromium tree (take 3).
This time, also:
fix invalid path in metro_driver.gyp.
set executable bit on check_sdk_patch.py and post_build.bat.
add back a switch that was removed recently
This reverts "Revert 155429 - Integrate the Windows 8 code into the Chromium tree."
Original CL: https://chromiumcodereview.appspot.com/10875008
BUG=127799
TEST=A Chromium build can run as the immersive browser on Windows 8.
TBR=ben
Review URL: https://chromiumcodereview.appspot.com/10919158
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155474 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8/metro_driver/settings_handler.h')
-rw-r--r-- | win8/metro_driver/settings_handler.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/win8/metro_driver/settings_handler.h b/win8/metro_driver/settings_handler.h new file mode 100644 index 0000000..5b234ad --- /dev/null +++ b/win8/metro_driver/settings_handler.h @@ -0,0 +1,44 @@ +// 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. + +#ifndef CHROME_BROWSER_UI_METRO_DRIVER_SETTINGS_HANDLER_H_ +#define CHROME_BROWSER_UI_METRO_DRIVER_SETTINGS_HANDLER_H_ + +#include <windows.ui.applicationsettings.h> +#include <windows.ui.popups.h> + +#include "winrt_utils.h" + +// This class handles the settings charm. +class SettingsHandler { + public: + SettingsHandler(); + ~SettingsHandler(); + + HRESULT Initialize(); + + private: + typedef winfoundtn::Collections::IVector< + winui::ApplicationSettings::SettingsCommand*> ISettingsCommandVector; + + HRESULT OnSettingsCommandsRequested( + winui::ApplicationSettings::ISettingsPane* settings_pane, + winui::ApplicationSettings:: + ISettingsPaneCommandsRequestedEventArgs* args); + + HRESULT AppendNewSettingsCommand( + const wchar_t* id, + const wchar_t* name, + winui::ApplicationSettings::ISettingsCommandFactory* + settings_command_factory, + ISettingsCommandVector* settings_command_vector); + + static HRESULT OnSettings(winui::Popups::IUICommand* command); + static HRESULT GetSettingsId(const wchar_t* value, + winfoundtn::IPropertyValue** settings_id); + + EventRegistrationToken settings_token_; +}; + +#endif // CHROME_BROWSER_UI_METRO_DRIVER_SETTINGS_HANDLER_H_ |