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

Side by Side Diff: chrome/browser/ui/ash/chrome_new_window_client.h

Issue 2599833003: ChromeOS: Fix NewWindow's bug with browser on other user's desktop and no browser on current's (Closed)
Patch Set: add test coverage Created 3 years, 10 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 | « no previous file | chrome/browser/ui/ash/chrome_new_window_client.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_ASH_CHROME_NEW_WINDOW_CLIENT_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_NEW_WINDOW_CLIENT_H_
6 #define CHROME_BROWSER_UI_ASH_CHROME_NEW_WINDOW_CLIENT_H_ 6 #define CHROME_BROWSER_UI_ASH_CHROME_NEW_WINDOW_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/public/interfaces/new_window.mojom.h" 10 #include "ash/public/interfaces/new_window.mojom.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "mojo/public/cpp/bindings/associated_binding.h" 12 #include "mojo/public/cpp/bindings/associated_binding.h"
13 13
14 class Browser;
15
14 class ChromeNewWindowClient : public ash::mojom::NewWindowClient { 16 class ChromeNewWindowClient : public ash::mojom::NewWindowClient {
15 public: 17 public:
16 ChromeNewWindowClient(); 18 ChromeNewWindowClient();
17 ~ChromeNewWindowClient() override; 19 ~ChromeNewWindowClient() override;
18 20
21 // Returns the active browser that has active browser window, if any.
22 static Browser* GetActiveBrowser();
23
19 // Overridden from ash::mojom::NewWindowClient: 24 // Overridden from ash::mojom::NewWindowClient:
20 void NewTab() override; 25 void NewTab() override;
21 void NewWindow(bool incognito) override; 26 void NewWindow(bool incognito) override;
22 void OpenFileManager() override; 27 void OpenFileManager() override;
23 void OpenCrosh() override; 28 void OpenCrosh() override;
24 void OpenGetHelp() override; 29 void OpenGetHelp() override;
25 void RestoreTab() override; 30 void RestoreTab() override;
26 void ShowKeyboardOverlay() override; 31 void ShowKeyboardOverlay() override;
27 void ShowTaskManager() override; 32 void ShowTaskManager() override;
28 void OpenFeedbackPage() override; 33 void OpenFeedbackPage() override;
29 34
30 private: 35 private:
31 class TabRestoreHelper; 36 class TabRestoreHelper;
32 37
33 std::unique_ptr<TabRestoreHelper> tab_restore_helper_; 38 std::unique_ptr<TabRestoreHelper> tab_restore_helper_;
34 39
35 ash::mojom::NewWindowControllerPtr new_window_controller_; 40 ash::mojom::NewWindowControllerPtr new_window_controller_;
36 41
37 // Binds this object to the client interface. 42 // Binds this object to the client interface.
38 mojo::AssociatedBinding<ash::mojom::NewWindowClient> binding_; 43 mojo::AssociatedBinding<ash::mojom::NewWindowClient> binding_;
39 44
40 DISALLOW_COPY_AND_ASSIGN(ChromeNewWindowClient); 45 DISALLOW_COPY_AND_ASSIGN(ChromeNewWindowClient);
41 }; 46 };
42 47
43 #endif // CHROME_BROWSER_UI_ASH_CHROME_NEW_WINDOW_CLIENT_H_ 48 #endif // CHROME_BROWSER_UI_ASH_CHROME_NEW_WINDOW_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/chrome_new_window_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698