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

Side by Side Diff: chrome/browser/ui/ime/ime_window.cc

Issue 2424853003: Remove FOR_EACH_OBSERVER macro usage in chrome/browser/ui (Closed)
Patch Set: explicit types Created 4 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
« no previous file with comments | « chrome/browser/ui/browser_list.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ime/ime_window.h" 5 #include "chrome/browser/ui/ime/ime_window.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 window_bounds.set_x(x); 125 window_bounds.set_x(x);
126 window_bounds.set_y(y); 126 window_bounds.set_y(y);
127 SetBounds(window_bounds); 127 SetBounds(window_bounds);
128 } 128 }
129 129
130 int ImeWindow::GetFrameId() const { 130 int ImeWindow::GetFrameId() const {
131 return web_contents_->GetMainFrame()->GetRoutingID(); 131 return web_contents_->GetMainFrame()->GetRoutingID();
132 } 132 }
133 133
134 void ImeWindow::OnWindowDestroyed() { 134 void ImeWindow::OnWindowDestroyed() {
135 FOR_EACH_OBSERVER(ImeWindowObserver, observers_, OnWindowDestroyed(this)); 135 for (ImeWindowObserver& observer : observers_)
136 observer.OnWindowDestroyed(this);
136 native_window_ = nullptr; 137 native_window_ = nullptr;
137 delete this; 138 delete this;
138 } 139 }
139 140
140 void ImeWindow::AddObserver(ImeWindowObserver* observer) { 141 void ImeWindow::AddObserver(ImeWindowObserver* observer) {
141 observers_.AddObserver(observer); 142 observers_.AddObserver(observer);
142 } 143 }
143 144
144 void ImeWindow::RemoveObserver(ImeWindowObserver* observer) { 145 void ImeWindow::RemoveObserver(ImeWindowObserver* observer) {
145 observers_.RemoveObserver(observer); 146 observers_.RemoveObserver(observer);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 bounds.set_width(pos.width()); 195 bounds.set_width(pos.width());
195 bounds.set_height(pos.height()); 196 bounds.set_height(pos.height());
196 native_window_->SetBounds(bounds); 197 native_window_->SetBounds(bounds);
197 } 198 }
198 199
199 bool ImeWindow::IsPopupOrPanel(const content::WebContents* source) const { 200 bool ImeWindow::IsPopupOrPanel(const content::WebContents* source) const {
200 return true; 201 return true;
201 } 202 }
202 203
203 } // namespace ui 204 } // namespace ui
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_list.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698