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

Side by Side Diff: chrome/browser/chromeos/login/ui/web_view_handle.h

Issue 2512473004: cros: Enable WebUILoginView reuse. (Closed)
Patch Set: Address comments Created 4 years 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 CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEB_VIEW_HANDLE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEB_VIEW_HANDLE_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12
13 class Profile;
14
15 namespace views {
16 class WebView;
17 }
18
19 namespace chromeos {
20
21 // Owns a views::WebView instance. Any caller actively using the views::WebView
22 // instance should increase/decrease the refcount.
23 class WebViewHandle : public base::RefCounted<WebViewHandle> {
24 public:
25 explicit WebViewHandle(Profile* profile);
26
27 // Returns an unowned pointer to the stored |web_view| instance.
28 views::WebView* web_view() { return web_view_.get(); }
29
30 private:
31 friend class base::RefCounted<WebViewHandle>;
32 ~WebViewHandle();
33
34 std::unique_ptr<views::WebView> web_view_;
35
36 DISALLOW_COPY_AND_ASSIGN(WebViewHandle);
37 };
38
39 } // namespace chromeos
40
41 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEB_VIEW_HANDLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/shared_web_view_factory.cc ('k') | chrome/browser/chromeos/login/ui/web_view_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698