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

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

Issue 2737523002: MacViews: Fix compilation. (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
tapted 2017/03/06 22:05:19 For the CL description, I'd go for something like
snake 2017/03/07 11:45:03 Done.
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 #include "chrome/browser/ui/views/extensions/extension_popup.h" 5 #include "chrome/browser/ui/views/extensions/extension_popup.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/devtools/devtools_window.h" 9 #include "chrome/browser/devtools/devtools_window.h"
10 #include "chrome/browser/extensions/extension_view_host.h" 10 #include "chrome/browser/extensions/extension_view_host.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
(...skipping 28 matching lines...) Expand all
40 const int ExtensionPopup::kMinHeight = 25; 40 const int ExtensionPopup::kMinHeight = 25;
41 const int ExtensionPopup::kMaxWidth = 800; 41 const int ExtensionPopup::kMaxWidth = 800;
42 const int ExtensionPopup::kMaxHeight = 600; 42 const int ExtensionPopup::kMaxHeight = 600;
43 43
44 #if !defined(USE_AURA) 44 #if !defined(USE_AURA)
45 // static 45 // static
46 ExtensionPopup* ExtensionPopup::Create(extensions::ExtensionViewHost* host, 46 ExtensionPopup* ExtensionPopup::Create(extensions::ExtensionViewHost* host,
47 views::View* anchor_view, 47 views::View* anchor_view,
48 views::BubbleBorder::Arrow arrow, 48 views::BubbleBorder::Arrow arrow,
49 ShowAction show_action) { 49 ShowAction show_action) {
50 auto popup = new ExtensionPopup(host, anchor_view, arrow, show_action); 50 ExtensionPopup* popup =
51 new ExtensionPopup(host, anchor_view, arrow, show_action);
tapted 2017/03/06 22:05:19 This doesn't follow the patterns established in h
snake 2017/03/07 11:45:03 Done.
51 views::BubbleDialogDelegateView::CreateBubble(popup); 52 views::BubbleDialogDelegateView::CreateBubble(popup);
52 return popup; 53 return popup;
53 } 54 }
54 #endif 55 #endif
55 56
56 ExtensionPopup::ExtensionPopup(extensions::ExtensionViewHost* host, 57 ExtensionPopup::ExtensionPopup(extensions::ExtensionViewHost* host,
57 views::View* anchor_view, 58 views::View* anchor_view,
58 views::BubbleBorder::Arrow arrow, 59 views::BubbleBorder::Arrow arrow,
59 ShowAction show_action) 60 ShowAction show_action)
60 : BubbleDialogDelegateView(anchor_view, arrow), 61 : BubbleDialogDelegateView(anchor_view, arrow),
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 GetWidget()->Show(); 198 GetWidget()->Show();
198 199
199 // Focus on the host contents when the bubble is first shown. 200 // Focus on the host contents when the bubble is first shown.
200 host()->host_contents()->Focus(); 201 host()->host_contents()->Focus();
201 202
202 if (inspect_with_devtools_) { 203 if (inspect_with_devtools_) {
203 DevToolsWindow::OpenDevToolsWindow( 204 DevToolsWindow::OpenDevToolsWindow(
204 host()->host_contents(), DevToolsToggleAction::ShowConsolePanel()); 205 host()->host_contents(), DevToolsToggleAction::ShowConsolePanel());
205 } 206 }
206 } 207 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698