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

Side by Side Diff: ui/base/win/hwnd_subclass.cc

Issue 2230183002: ui: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
« no previous file with comments | « ui/base/models/tree_node_model.h ('k') | ui/base/window_tracker_template.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/base/win/hwnd_subclass.h" 5 #include "ui/base/win/hwnd_subclass.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 (*it)->RemoveFilter(filter); 103 (*it)->RemoveFilter(filter);
104 } 104 }
105 105
106 // static 106 // static
107 HWNDSubclass* HWNDSubclass::GetHwndSubclassForTarget(HWND target) { 107 HWNDSubclass* HWNDSubclass::GetHwndSubclassForTarget(HWND target) {
108 return HWNDSubclassFactory::GetInstance()->GetHwndSubclassForTarget(target); 108 return HWNDSubclassFactory::GetInstance()->GetHwndSubclassForTarget(target);
109 } 109 }
110 110
111 void HWNDSubclass::AddFilter(HWNDMessageFilter* filter) { 111 void HWNDSubclass::AddFilter(HWNDMessageFilter* filter) {
112 DCHECK(filter); 112 DCHECK(filter);
113 if (!ContainsValue(filters_, filter)) 113 if (!base::ContainsValue(filters_, filter))
114 filters_.push_back(filter); 114 filters_.push_back(filter);
115 } 115 }
116 116
117 void HWNDSubclass::RemoveFilter(HWNDMessageFilter* filter) { 117 void HWNDSubclass::RemoveFilter(HWNDMessageFilter* filter) {
118 std::vector<HWNDMessageFilter*>::iterator it = 118 std::vector<HWNDMessageFilter*>::iterator it =
119 std::find(filters_.begin(), filters_.end(), filter); 119 std::find(filters_.begin(), filters_.end(), filter);
120 if (it != filters_.end()) 120 if (it != filters_.end())
121 filters_.erase(it); 121 filters_.erase(it);
122 } 122 }
123 123
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // In most cases, |original_wnd_proc_| will take care of calling 163 // In most cases, |original_wnd_proc_| will take care of calling
164 // DefWindowProc. 164 // DefWindowProc.
165 return CallWindowProc(original_wnd_proc_, hwnd, message, w_param, l_param); 165 return CallWindowProc(original_wnd_proc_, hwnd, message, w_param, l_param);
166 } 166 }
167 167
168 HWNDMessageFilter::~HWNDMessageFilter() { 168 HWNDMessageFilter::~HWNDMessageFilter() {
169 HWNDSubclass::RemoveFilterFromAllTargets(this); 169 HWNDSubclass::RemoveFilterFromAllTargets(this);
170 } 170 }
171 171
172 } // namespace ui 172 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/models/tree_node_model.h ('k') | ui/base/window_tracker_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698