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

Side by Side Diff: chrome/browser/ui/test/test_app_window_observer.h

Issue 2900783003: Handle app custom icon via aura::Window property. (Closed)
Patch Set: forgot to add test_app_window_observer.* Created 3 years, 7 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_TEST_TEST_APP_WINDOW_OBSERVER_H_
6 #define CHROME_BROWSER_UI_TEST_TEST_APP_WINDOW_OBSERVER_H_
7
8 #include <vector>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "extensions/browser/app_window/app_window_registry.h"
13 #include "ui/aura/window_observer.h"
14
15 namespace content {
16 class BrowserContext;
17 }
18
19 class TestAppWindowObserver : public extensions::AppWindowRegistry::Observer,
20 public aura::WindowObserver {
21 public:
22 explicit TestAppWindowObserver(content::BrowserContext* context);
23 ~TestAppWindowObserver() override;
24
25 // Waits for one icon update.
26 void WaitForIconUpdate();
27 // Waits for |updates| number of icon updates.
28 void WaitForIconUpdates(int updates);
29
30 int icon_updates() const { return icon_updates_; }
31
32 private:
33 // AppWindowRegistry::Observer:
34 void OnAppWindowAdded(extensions::AppWindow* app_window) override;
35 void OnAppWindowRemoved(extensions::AppWindow* app_window) override;
36
37 // aura::WindowObserver:
38 void OnWindowPropertyChanged(aura::Window* window,
39 const void* key,
40 intptr_t old) override;
41 content::BrowserContext* const context_;
42 int icon_updates_ = 0;
43 int expeced_icon_updates_ = 0;
Devlin 2017/05/31 22:00:01 typo: expected
khmel 2017/06/01 16:56:52 Done.
44 std::vector<aura::Window*> windows_;
45 base::OnceClosure icon_updated_callback_;
46
47 DISALLOW_COPY_AND_ASSIGN(TestAppWindowObserver);
48 };
49
50 #endif // CHROME_BROWSER_UI_TEST_TEST_APP_WINDOW_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698