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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_popup.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Create and show a popup with the given |host| positioned adjacent to 45 // Create and show a popup with the given |host| positioned adjacent to
46 // |anchor_view|. 46 // |anchor_view|.
47 // The positioning of the pop-up is determined by |arrow| according to the 47 // The positioning of the pop-up is determined by |arrow| according to the
48 // following logic: The popup is anchored so that the corner indicated by the 48 // following logic: The popup is anchored so that the corner indicated by the
49 // value of |arrow| remains fixed during popup resizes. If |arrow| is 49 // value of |arrow| remains fixed during popup resizes. If |arrow| is
50 // BOTTOM_*, then the popup 'pops up', otherwise the popup 'drops down'. 50 // BOTTOM_*, then the popup 'pops up', otherwise the popup 'drops down'.
51 // The actual display of the popup is delayed until the page contents 51 // The actual display of the popup is delayed until the page contents
52 // finish loading in order to minimize UI flashing and resizing. 52 // finish loading in order to minimize UI flashing and resizing.
53 static ExtensionPopup* ShowPopup( 53 static ExtensionPopup* ShowPopup(
54 scoped_ptr<extensions::ExtensionViewHost> host, 54 std::unique_ptr<extensions::ExtensionViewHost> host,
55 views::View* anchor_view, 55 views::View* anchor_view,
56 views::BubbleBorder::Arrow arrow, 56 views::BubbleBorder::Arrow arrow,
57 ShowAction show_action); 57 ShowAction show_action);
58 58
59 extensions::ExtensionViewHost* host() const { return host_.get(); } 59 extensions::ExtensionViewHost* host() const { return host_.get(); }
60 60
61 // views::BubbleDialogDelegateView overrides. 61 // views::BubbleDialogDelegateView overrides.
62 int GetDialogButtons() const override; 62 int GetDialogButtons() const override;
63 63
64 // content::NotificationObserver overrides. 64 // content::NotificationObserver overrides.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 views::View* anchor_view, 103 views::View* anchor_view,
104 views::BubbleBorder::Arrow arrow, 104 views::BubbleBorder::Arrow arrow,
105 ShowAction show_action); 105 ShowAction show_action);
106 106
107 // Show the bubble, focus on its content, and register listeners. 107 // Show the bubble, focus on its content, and register listeners.
108 void ShowBubble(); 108 void ShowBubble();
109 109
110 void OnDevToolsStateChanged(content::DevToolsAgentHost*, bool attached); 110 void OnDevToolsStateChanged(content::DevToolsAgentHost*, bool attached);
111 111
112 // The contained host for the view. 112 // The contained host for the view.
113 scoped_ptr<extensions::ExtensionViewHost> host_; 113 std::unique_ptr<extensions::ExtensionViewHost> host_;
114 114
115 // Flag used to indicate if the pop-up should open a devtools window once 115 // Flag used to indicate if the pop-up should open a devtools window once
116 // it is shown inspecting it. 116 // it is shown inspecting it.
117 bool inspect_with_devtools_; 117 bool inspect_with_devtools_;
118 118
119 content::NotificationRegistrar registrar_; 119 content::NotificationRegistrar registrar_;
120 120
121 base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_; 121 base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_;
122 122
123 bool widget_initialized_; 123 bool widget_initialized_;
124 124
125 DISALLOW_COPY_AND_ASSIGN(ExtensionPopup); 125 DISALLOW_COPY_AND_ASSIGN(ExtensionPopup);
126 }; 126 };
127 127
128 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ 128 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698