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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/cocoa/profiles/user_manager_mac.h" 5 #include "chrome/browser/ui/cocoa/profiles/user_manager_mac.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #import "chrome/browser/app_controller_mac.h" 9 #import "chrome/browser/app_controller_mac.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 15 matching lines...) Expand all
26 // is reset to NULL when the window is closed. 26 // is reset to NULL when the window is closed.
27 UserManagerMac* instance_ = NULL; // Weak. 27 UserManagerMac* instance_ = NULL; // Weak.
28 28
29 // Custom WebContentsDelegate that allows handling of hotkeys. 29 // Custom WebContentsDelegate that allows handling of hotkeys.
30 class UserManagerWebContentsDelegate : public content::WebContentsDelegate { 30 class UserManagerWebContentsDelegate : public content::WebContentsDelegate {
31 public: 31 public:
32 UserManagerWebContentsDelegate() {} 32 UserManagerWebContentsDelegate() {}
33 33
34 // WebContentsDelegate implementation. Forwards all unhandled keyboard events 34 // WebContentsDelegate implementation. Forwards all unhandled keyboard events
35 // to the current window. 35 // to the current window.
36 virtual void HandleKeyboardEvent( 36 void HandleKeyboardEvent(
37 content::WebContents* source, 37 content::WebContents* source,
38 const content::NativeWebKeyboardEvent& event) override { 38 const content::NativeWebKeyboardEvent& event) override {
39 if (![BrowserWindowUtils shouldHandleKeyboardEvent:event]) 39 if (![BrowserWindowUtils shouldHandleKeyboardEvent:event])
40 return; 40 return;
41 41
42 // -getCommandId returns -1 if the event isn't a chrome accelerator. 42 // -getCommandId returns -1 if the event isn't a chrome accelerator.
43 int chromeCommandId = [BrowserWindowUtils getCommandId:event]; 43 int chromeCommandId = [BrowserWindowUtils getCommandId:event];
44 44
45 // Check for Cmd+A and Cmd+V events that could come from a password field. 45 // Check for Cmd+A and Cmd+V events that could come from a password field.
46 bool isTextEditingCommand = 46 bool isTextEditingCommand =
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 const std::string& url) { 204 const std::string& url) {
205 DCHECK(!instance_); 205 DCHECK(!instance_);
206 instance_ = new UserManagerMac(guest_profile); 206 instance_ = new UserManagerMac(guest_profile);
207 [instance_->window_controller() showURL:GURL(url)]; 207 [instance_->window_controller() showURL:GURL(url)];
208 } 208 }
209 209
210 void UserManagerMac::WindowWasClosed() { 210 void UserManagerMac::WindowWasClosed() {
211 instance_ = NULL; 211 instance_ = NULL;
212 delete this; 212 delete this;
213 } 213 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698