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

Side by Side Diff: chrome/browser/ui/webui/constrained_web_dialog_ui.cc

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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webui/constrained_web_dialog_ui.h" 5 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 18 matching lines...) Expand all
29 namespace { 29 namespace {
30 30
31 const char kConstrainedWebDialogDelegateUserDataKey[] = 31 const char kConstrainedWebDialogDelegateUserDataKey[] =
32 "ConstrainedWebDialogDelegateUserData"; 32 "ConstrainedWebDialogDelegateUserData";
33 33
34 class ConstrainedWebDialogDelegateUserData 34 class ConstrainedWebDialogDelegateUserData
35 : public base::SupportsUserData::Data { 35 : public base::SupportsUserData::Data {
36 public: 36 public:
37 explicit ConstrainedWebDialogDelegateUserData( 37 explicit ConstrainedWebDialogDelegateUserData(
38 ConstrainedWebDialogDelegate* delegate) : delegate_(delegate) {} 38 ConstrainedWebDialogDelegate* delegate) : delegate_(delegate) {}
39 virtual ~ConstrainedWebDialogDelegateUserData() {} 39 ~ConstrainedWebDialogDelegateUserData() override {}
40 40
41 ConstrainedWebDialogDelegate* delegate() { return delegate_; } 41 ConstrainedWebDialogDelegate* delegate() { return delegate_; }
42 42
43 private: 43 private:
44 ConstrainedWebDialogDelegate* delegate_; // unowned 44 ConstrainedWebDialogDelegate* delegate_; // unowned
45 45
46 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateUserData); 46 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateUserData);
47 }; 47 };
48 48
49 } // namespace 49 } // namespace
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 ConstrainedWebDialogDelegate* ConstrainedWebDialogUI::GetConstrainedDelegate() { 105 ConstrainedWebDialogDelegate* ConstrainedWebDialogUI::GetConstrainedDelegate() {
106 ConstrainedWebDialogDelegateUserData* user_data = 106 ConstrainedWebDialogDelegateUserData* user_data =
107 static_cast<ConstrainedWebDialogDelegateUserData*>( 107 static_cast<ConstrainedWebDialogDelegateUserData*>(
108 web_ui()->GetWebContents()-> 108 web_ui()->GetWebContents()->
109 GetUserData(&kConstrainedWebDialogDelegateUserDataKey)); 109 GetUserData(&kConstrainedWebDialogDelegateUserDataKey));
110 110
111 return user_data ? user_data->delegate() : NULL; 111 return user_data ? user_data->delegate() : NULL;
112 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698