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

Side by Side Diff: chrome/browser/apps/app_shim/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/app_shim_handler_mac.h" 5 #include "chrome/browser/apps/app_shim/app_shim_handler_mac.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 this, chrome::NOTIFICATION_BROWSER_OPENED, 84 this, chrome::NOTIFICATION_BROWSER_OPENED,
85 content::NotificationService::AllBrowserContextsAndSources()); 85 content::NotificationService::AllBrowserContextsAndSources());
86 registrar_.Add( 86 registrar_.Add(
87 this, chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST, 87 this, chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
88 content::NotificationService::AllBrowserContextsAndSources()); 88 content::NotificationService::AllBrowserContextsAndSources());
89 registrar_.Add( 89 registrar_.Add(
90 this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 90 this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
91 content::NotificationService::AllBrowserContextsAndSources()); 91 content::NotificationService::AllBrowserContextsAndSources());
92 } 92 }
93 93
94 virtual ~AppShimHandlerRegistry() {} 94 ~AppShimHandlerRegistry() override {}
95 95
96 // content::NotificationObserver override: 96 // content::NotificationObserver override:
97 virtual void Observe( 97 void Observe(int type,
98 int type, 98 const content::NotificationSource& source,
99 const content::NotificationSource& source, 99 const content::NotificationDetails& details) override {
100 const content::NotificationDetails& details) override {
101 switch (type) { 100 switch (type) {
102 case chrome::NOTIFICATION_BROWSER_OPENED: 101 case chrome::NOTIFICATION_BROWSER_OPENED:
103 case chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED: 102 case chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED:
104 browser_session_running_ = true; 103 browser_session_running_ = true;
105 break; 104 break;
106 case chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST: 105 case chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST:
107 browser_session_running_ = false; 106 browser_session_running_ = false;
108 break; 107 break;
109 default: 108 default:
110 NOTREACHED(); 109 NOTREACHED();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void AppShimHandler::MaybeTerminate() { 146 void AppShimHandler::MaybeTerminate() {
148 AppShimHandlerRegistry::GetInstance()->MaybeTerminate(); 147 AppShimHandlerRegistry::GetInstance()->MaybeTerminate();
149 } 148 }
150 149
151 // static 150 // static
152 bool AppShimHandler::ShouldRestoreSession() { 151 bool AppShimHandler::ShouldRestoreSession() {
153 return AppShimHandlerRegistry::GetInstance()->ShouldRestoreSession(); 152 return AppShimHandlerRegistry::GetInstance()->ShouldRestoreSession();
154 } 153 }
155 154
156 } // namespace apps 155 } // namespace apps
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest_util.h ('k') | chrome/browser/apps/app_shim/app_shim_host_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698