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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.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/ime/ime_window.cc ('k') | chrome/browser/ui/search/search_model.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 (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/libgtk2ui/gtk2_ui.h" 5 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <pango/pango.h> 8 #include <pango/pango.h>
9 #include <X11/Xcursor/Xcursor.h> 9 #include <X11/Xcursor/Xcursor.h>
10 #include <set> 10 #include <set>
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 views::WindowButtonOrderObserver* observer) { 710 views::WindowButtonOrderObserver* observer) {
711 observer_list_.RemoveObserver(observer); 711 observer_list_.RemoveObserver(observer);
712 } 712 }
713 713
714 void Gtk2UI::SetWindowButtonOrdering( 714 void Gtk2UI::SetWindowButtonOrdering(
715 const std::vector<views::FrameButton>& leading_buttons, 715 const std::vector<views::FrameButton>& leading_buttons,
716 const std::vector<views::FrameButton>& trailing_buttons) { 716 const std::vector<views::FrameButton>& trailing_buttons) {
717 leading_buttons_ = leading_buttons; 717 leading_buttons_ = leading_buttons;
718 trailing_buttons_ = trailing_buttons; 718 trailing_buttons_ = trailing_buttons;
719 719
720 FOR_EACH_OBSERVER(views::WindowButtonOrderObserver, observer_list_, 720 for (views::WindowButtonOrderObserver& observer : observer_list_)
721 OnWindowButtonOrderingChange(leading_buttons_, 721 observer.OnWindowButtonOrderingChange(leading_buttons_, trailing_buttons_);
722 trailing_buttons_));
723 } 722 }
724 723
725 void Gtk2UI::SetNonClientMiddleClickAction(NonClientMiddleClickAction action) { 724 void Gtk2UI::SetNonClientMiddleClickAction(NonClientMiddleClickAction action) {
726 middle_click_action_ = action; 725 middle_click_action_ = action;
727 } 726 }
728 727
729 std::unique_ptr<ui::LinuxInputMethodContext> Gtk2UI::CreateInputMethodContext( 728 std::unique_ptr<ui::LinuxInputMethodContext> Gtk2UI::CreateInputMethodContext(
730 ui::LinuxInputMethodContextDelegate* delegate, 729 ui::LinuxInputMethodContextDelegate* delegate,
731 bool is_simple) const { 730 bool is_simple) const {
732 return std::unique_ptr<ui::LinuxInputMethodContext>( 731 return std::unique_ptr<ui::LinuxInputMethodContext>(
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 // Blacklist scaling factors <130% (crbug.com/484400) and round 1087 // Blacklist scaling factors <130% (crbug.com/484400) and round
1089 // to 1 decimal to prevent rendering problems (crbug.com/485183). 1088 // to 1 decimal to prevent rendering problems (crbug.com/485183).
1090 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; 1089 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10;
1091 } 1090 }
1092 1091
1093 } // namespace libgtk2ui 1092 } // namespace libgtk2ui
1094 1093
1095 views::LinuxUI* BuildGtk2UI() { 1094 views::LinuxUI* BuildGtk2UI() {
1096 return new libgtk2ui::Gtk2UI; 1095 return new libgtk2ui::Gtk2UI;
1097 } 1096 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ime/ime_window.cc ('k') | chrome/browser/ui/search/search_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698