summaryrefslogtreecommitdiffstats
path: root/win8
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2015-05-04 07:37:30 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-04 14:38:01 +0000
commit19bd8fbb51a53b557534defa63662db0b739f3ab (patch)
tree1ce698f6aa2b397fbeeb94e1387b1fc182a177d9 /win8
parent651f3588630e17584eccd4dc4507011e9bd6dfeb (diff)
downloadchromium_src-19bd8fbb51a53b557534defa63662db0b739f3ab.zip
chromium_src-19bd8fbb51a53b557534defa63662db0b739f3ab.tar.gz
chromium_src-19bd8fbb51a53b557534defa63662db0b739f3ab.tar.bz2
win: Fix remaining style plugin warnings in win8/.
Also do a few minor style cleanups. BUG=467287 Review URL: https://codereview.chromium.org/1117413003 Cr-Commit-Position: refs/heads/master@{#328123}
Diffstat (limited to 'win8')
-rw-r--r--win8/delegate_execute/command_execute_impl.cc3
-rw-r--r--win8/delegate_execute/command_execute_impl.h8
-rw-r--r--win8/metro_driver/file_picker_ash.cc21
-rw-r--r--win8/metro_driver/file_picker_ash.h43
4 files changed, 39 insertions, 36 deletions
diff --git a/win8/delegate_execute/command_execute_impl.cc b/win8/delegate_execute/command_execute_impl.cc
index 9c2c736..9e8a4e5 100644
--- a/win8/delegate_execute/command_execute_impl.cc
+++ b/win8/delegate_execute/command_execute_impl.cc
@@ -181,6 +181,9 @@ CommandExecuteImpl::CommandExecuteImpl()
}
}
+CommandExecuteImpl::~CommandExecuteImpl() {
+}
+
// CommandExecuteImpl
STDMETHODIMP CommandExecuteImpl::SetKeyState(DWORD key_state) {
return S_OK;
diff --git a/win8/delegate_execute/command_execute_impl.h b/win8/delegate_execute/command_execute_impl.h
index dd73ede..d7b60de 100644
--- a/win8/delegate_execute/command_execute_impl.h
+++ b/win8/delegate_execute/command_execute_impl.h
@@ -37,6 +37,7 @@ class ATL_NO_VTABLE DECLSPEC_UUID("071BB5F2-85A4-424F-BFE7-5F1609BE4C2C")
public IForegroundTransfer {
public:
CommandExecuteImpl();
+ ~CommandExecuteImpl() override;
DECLARE_REGISTRY_RESOURCEID(IDR_COMMANDEXECUTEIMPL)
@@ -66,7 +67,7 @@ class ATL_NO_VTABLE DECLSPEC_UUID("071BB5F2-85A4-424F-BFE7-5F1609BE4C2C")
STDMETHOD(SetShowWindow)(int show) override;
STDMETHOD(SetNoShowUI)(BOOL no_show_ui) override;
STDMETHOD(SetDirectory)(LPCWSTR directory) override;
- STDMETHOD(Execute)(void)override;
+ STDMETHOD(Execute)() override;
// IInitializeCommand
STDMETHOD(Initialize)(LPCWSTR name, IPropertyBag * bag) override;
@@ -84,14 +85,13 @@ class ATL_NO_VTABLE DECLSPEC_UUID("071BB5F2-85A4-424F-BFE7-5F1609BE4C2C")
static bool FindChromeExe(base::FilePath* chrome_exe);
private:
-
- static bool path_provider_initialized_;
-
bool GetLaunchScheme(base::string16* display_name, INTERNET_SCHEME* scheme);
HRESULT LaunchDesktopChrome();
// Returns the launch mode, i.e. desktop launch/metro launch, etc.
EC_HOST_UI_MODE GetLaunchMode();
+ static bool path_provider_initialized_;
+
CComPtr<IShellItemArray> item_array_;
base::CommandLine parameters_;
base::FilePath chrome_exe_;
diff --git a/win8/metro_driver/file_picker_ash.cc b/win8/metro_driver/file_picker_ash.cc
index cc03b3c..d88d286 100644
--- a/win8/metro_driver/file_picker_ash.cc
+++ b/win8/metro_driver/file_picker_ash.cc
@@ -71,6 +71,15 @@ class StringVectorImpl : public mswr::RuntimeClass<StringVectorItf> {
} // namespace
+FilePickerSessionBase::~FilePickerSessionBase() {
+}
+
+bool FilePickerSessionBase::Run() {
+ if (!DoFilePicker())
+ return false;
+ return success_;
+}
+
FilePickerSessionBase::FilePickerSessionBase(ChromeAppViewAsh* app_view,
const base::string16& title,
const base::string16& filter,
@@ -82,12 +91,6 @@ FilePickerSessionBase::FilePickerSessionBase(ChromeAppViewAsh* app_view,
success_(false) {
}
-bool FilePickerSessionBase::Run() {
- if (!DoFilePicker())
- return false;
- return success_;
-}
-
bool FilePickerSessionBase::DoFilePicker() {
// The file picker will fail if spawned from a snapped application,
// so let's attempt to unsnap first if we're in that state.
@@ -115,6 +118,9 @@ OpenFilePickerSession::OpenFilePickerSession(
allow_multi_select_(allow_multi_select) {
}
+OpenFilePickerSession::~OpenFilePickerSession() {
+}
+
HRESULT OpenFilePickerSession::SinglePickerDone(SingleFileAsyncOp* async,
AsyncStatus status) {
if (status == Completed) {
@@ -542,7 +548,8 @@ HRESULT SaveFilePickerSession::FilePickerDone(SaveFileAsyncOp* async,
FolderPickerSession::FolderPickerSession(ChromeAppViewAsh* app_view,
const base::string16& title)
- : FilePickerSessionBase(app_view, title, L"", base::FilePath()) {}
+ : FilePickerSessionBase(app_view, title, L"", base::FilePath()) {
+}
HRESULT FolderPickerSession::StartFilePicker() {
mswrw::HStringReference class_name(
diff --git a/win8/metro_driver/file_picker_ash.h b/win8/metro_driver/file_picker_ash.h
index 91eee2f..821678b 100644
--- a/win8/metro_driver/file_picker_ash.h
+++ b/win8/metro_driver/file_picker_ash.h
@@ -21,27 +21,22 @@ class FilePath;
// Base class for the file pickers.
class FilePickerSessionBase {
public:
- // Creates a file picker for open_file_name.
- explicit FilePickerSessionBase(ChromeAppViewAsh* app_view,
- const base::string16& title,
- const base::string16& filter,
- const base::FilePath& default_path);
-
- virtual ~FilePickerSessionBase() {
- }
+ virtual ~FilePickerSessionBase();
// Runs the picker, returns true on success.
bool Run();
- const base::string16& result() const {
- return result_;
- }
+ const base::string16& result() const { return result_; }
- bool success() const {
- return success_;
- }
+ bool success() const { return success_; }
protected:
+ // Creates a file picker for open_file_name.
+ FilePickerSessionBase(ChromeAppViewAsh* app_view,
+ const base::string16& title,
+ const base::string16& filter,
+ const base::FilePath& default_path);
+
// Creates, configures and starts a file picker.
// If the HRESULT returned is a failure code the file picker has not started,
// so no callbacks should be expected.
@@ -77,11 +72,12 @@ class FilePickerSessionBase {
// metro dialog.
class OpenFilePickerSession : public FilePickerSessionBase {
public:
- explicit OpenFilePickerSession(ChromeAppViewAsh* app_view,
- const base::string16& title,
- const base::string16& filter,
- const base::FilePath& default_path,
- bool allow_multi_select);
+ OpenFilePickerSession(ChromeAppViewAsh* app_view,
+ const base::string16& title,
+ const base::string16& filter,
+ const base::FilePath& default_path,
+ bool allow_multi_select);
+ ~OpenFilePickerSession() override;
const std::vector<base::FilePath>& filenames() const {
return filenames_;
@@ -112,7 +108,6 @@ class OpenFilePickerSession : public FilePickerSessionBase {
static HRESULT ComposeMultiFileResult(StorageFileVectorCollection* files,
base::string16* result);
- private:
// True if the multi file picker is to be displayed.
bool allow_multi_select_;
// If multi select is true then this member contains the list of filenames
@@ -125,9 +120,8 @@ class OpenFilePickerSession : public FilePickerSessionBase {
// Provides functionality to display the save file picker.
class SaveFilePickerSession : public FilePickerSessionBase {
public:
- explicit SaveFilePickerSession(
- ChromeAppViewAsh* app_view,
- const MetroViewerHostMsg_SaveAsDialogParams& params);
+ SaveFilePickerSession(ChromeAppViewAsh* app_view,
+ const MetroViewerHostMsg_SaveAsDialogParams& params);
int SaveFilePickerSession::filter_index() const;
@@ -148,8 +142,7 @@ class SaveFilePickerSession : public FilePickerSessionBase {
// Provides functionality to display the folder picker.
class FolderPickerSession : public FilePickerSessionBase {
public:
- explicit FolderPickerSession(ChromeAppViewAsh* app_view,
- const base::string16& title);
+ FolderPickerSession(ChromeAppViewAsh* app_view, const base::string16& title);
private:
HRESULT StartFilePicker() override;