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

Side by Side Diff: chrome/browser/apps/app_shim/extension_app_shim_handler_mac.cc

Issue 668903002: Standardize usage of virtual/override/final in chrome/browser/apps/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h" 5 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h"
6 6
7 #include "apps/app_lifetime_monitor_factory.h" 7 #include "apps/app_lifetime_monitor_factory.h"
8 #include "apps/launcher.h" 8 #include "apps/launcher.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 class EnableViaPrompt : public ExtensionEnableFlowDelegate { 85 class EnableViaPrompt : public ExtensionEnableFlowDelegate {
86 public: 86 public:
87 EnableViaPrompt(Profile* profile, 87 EnableViaPrompt(Profile* profile,
88 const std::string& extension_id, 88 const std::string& extension_id,
89 const base::Callback<void()>& callback) 89 const base::Callback<void()>& callback)
90 : profile_(profile), 90 : profile_(profile),
91 extension_id_(extension_id), 91 extension_id_(extension_id),
92 callback_(callback) { 92 callback_(callback) {
93 } 93 }
94 94
95 virtual ~EnableViaPrompt() { 95 ~EnableViaPrompt() override {}
96 }
97 96
98 void Run() { 97 void Run() {
99 flow_.reset(new ExtensionEnableFlow(profile_, extension_id_, this)); 98 flow_.reset(new ExtensionEnableFlow(profile_, extension_id_, this));
100 flow_->StartForCurrentlyNonexistentWindow( 99 flow_->StartForCurrentlyNonexistentWindow(
101 base::Callback<gfx::NativeWindow(void)>()); 100 base::Callback<gfx::NativeWindow(void)>());
102 } 101 }
103 102
104 private: 103 private:
105 // ExtensionEnableFlowDelegate overrides. 104 // ExtensionEnableFlowDelegate overrides.
106 virtual void ExtensionEnableFlowFinished() override { 105 void ExtensionEnableFlowFinished() override {
107 callback_.Run(); 106 callback_.Run();
108 delete this; 107 delete this;
109 } 108 }
110 109
111 virtual void ExtensionEnableFlowAborted(bool user_initiated) override { 110 void ExtensionEnableFlowAborted(bool user_initiated) override {
112 callback_.Run(); 111 callback_.Run();
113 delete this; 112 delete this;
114 } 113 }
115 114
116 Profile* profile_; 115 Profile* profile_;
117 std::string extension_id_; 116 std::string extension_id_;
118 base::Callback<void()> callback_; 117 base::Callback<void()> callback_;
119 scoped_ptr<ExtensionEnableFlow> flow_; 118 scoped_ptr<ExtensionEnableFlow> flow_;
120 119
121 DISALLOW_COPY_AND_ASSIGN(EnableViaPrompt); 120 DISALLOW_COPY_AND_ASSIGN(EnableViaPrompt);
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 if (hosts_.empty()) 547 if (hosts_.empty())
549 delegate_->MaybeTerminate(); 548 delegate_->MaybeTerminate();
550 } 549 }
551 550
552 void ExtensionAppShimHandler::OnAppStop(Profile* profile, 551 void ExtensionAppShimHandler::OnAppStop(Profile* profile,
553 const std::string& app_id) {} 552 const std::string& app_id) {}
554 553
555 void ExtensionAppShimHandler::OnChromeTerminating() {} 554 void ExtensionAppShimHandler::OnChromeTerminating() {}
556 555
557 } // namespace apps 556 } // namespace apps
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698