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

Side by Side Diff: blimp/engine/app/ui/blimp_screen.cc

Issue 2425493002: Remove usage of FOR_EACH_OBSERVER macro in blimp (Closed)
Patch Set: 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 | « blimp/engine/app/settings_manager.cc ('k') | blimp/net/blimp_connection.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/engine/app/ui/blimp_screen.h" 5 #include "blimp/engine/app/ui/blimp_screen.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/aura/window_tree_host.h" 8 #include "ui/aura/window_tree_host.h"
9 #include "ui/display/display_observer.h" 9 #include "ui/display/display_observer.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
(...skipping 21 matching lines...) Expand all
32 32
33 uint32_t metrics = display::DisplayObserver::DISPLAY_METRIC_NONE; 33 uint32_t metrics = display::DisplayObserver::DISPLAY_METRIC_NONE;
34 if (scale != display_.device_scale_factor()) 34 if (scale != display_.device_scale_factor())
35 metrics |= display::DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR; 35 metrics |= display::DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR;
36 36
37 if (size != display_.GetSizeInPixel()) 37 if (size != display_.GetSizeInPixel())
38 metrics |= display::DisplayObserver::DISPLAY_METRIC_BOUNDS; 38 metrics |= display::DisplayObserver::DISPLAY_METRIC_BOUNDS;
39 39
40 display_.SetScaleAndBounds(scale, gfx::Rect(size)); 40 display_.SetScaleAndBounds(scale, gfx::Rect(size));
41 41
42 FOR_EACH_OBSERVER(display::DisplayObserver, observers_, 42 for (auto& observer : observers_)
43 OnDisplayMetricsChanged(display_, metrics)); 43 observer.OnDisplayMetricsChanged(display_, metrics);
44 } 44 }
45 45
46 gfx::Point BlimpScreen::GetCursorScreenPoint() { 46 gfx::Point BlimpScreen::GetCursorScreenPoint() {
47 return gfx::Point(); 47 return gfx::Point();
48 } 48 }
49 49
50 bool BlimpScreen::IsWindowUnderCursor(gfx::NativeWindow window) { 50 bool BlimpScreen::IsWindowUnderCursor(gfx::NativeWindow window) {
51 NOTIMPLEMENTED(); 51 NOTIMPLEMENTED();
52 return false; 52 return false;
53 } 53 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void BlimpScreen::AddObserver(display::DisplayObserver* observer) { 88 void BlimpScreen::AddObserver(display::DisplayObserver* observer) {
89 observers_.AddObserver(observer); 89 observers_.AddObserver(observer);
90 } 90 }
91 91
92 void BlimpScreen::RemoveObserver(display::DisplayObserver* observer) { 92 void BlimpScreen::RemoveObserver(display::DisplayObserver* observer) {
93 observers_.RemoveObserver(observer); 93 observers_.RemoveObserver(observer);
94 } 94 }
95 95
96 } // namespace engine 96 } // namespace engine
97 } // namespace blimp 97 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/app/settings_manager.cc ('k') | blimp/net/blimp_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698