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

Side by Side Diff: ash/common/new_window_client_proxy.h

Issue 2434463004: mash: Move directly linked NewWindowDelegate to mojom::NewWindowClient. (Closed)
Patch Set: Rebase to ToT Created 4 years, 1 month 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 2016 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 ASH_COMMON_NEW_WINDOW_CLIENT_PROXY_H_
6 #define ASH_COMMON_NEW_WINDOW_CLIENT_PROXY_H_
7
8 #include "ash/public/interfaces/new_window.mojom.h"
9 #include "base/macros.h"
10
11 namespace service_manager {
12 class Connector;
13 }
14
15 namespace ash {
16
17 // A NewWindowClient which lazily connects to an exported mojom::NewWindowClient
18 // in "service:content_browser" on first use.
19 class NewWindowClientProxy : public mojom::NewWindowClient {
20 public:
21 explicit NewWindowClientProxy(service_manager::Connector* connector);
22 ~NewWindowClientProxy() override;
23
24 // NewWindowClient:
25 void NewTab() override;
26 void NewWindow(bool incognito) override;
27 void OpenFileManager() override;
28 void OpenCrosh() override;
29 void OpenGetHelp() override;
30 void RestoreTab() override;
31 void ShowKeyboardOverlay() override;
32 void ShowTaskManager() override;
33 void OpenFeedbackPage() override;
34
35 private:
36 // Ensures that we have a valid |client_| before we try to use it.
37 void EnsureInterface();
38
39 // Clears |client_| when |client_| has a connection error.
40 void OnClientConnectionError();
41
42 service_manager::Connector* connector_;
43 mojom::NewWindowClientPtr client_;
44
45 DISALLOW_COPY_AND_ASSIGN(NewWindowClientProxy);
46 };
47
48 } // namespace ash
49
50 #endif // ASH_COMMON_NEW_WINDOW_CLIENT_PROXY_H_
OLDNEW
« no previous file with comments | « ash/common/accelerators/accelerator_controller.cc ('k') | ash/common/new_window_client_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698