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

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

Issue 547303003: Keep reference view pressed while extension actions have a popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: VIEWS_EXPORT fix Created 6 years, 2 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/views/extensions/extension_action_view_controller.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ACTION_VIEW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_
7 7
8 #include "chrome/browser/extensions/extension_action_icon_factory.h" 8 #include "chrome/browser/extensions/extension_action_icon_factory.h"
9 #include "chrome/browser/extensions/extension_context_menu_model.h" 9 #include "chrome/browser/extensions/extension_context_menu_model.h"
10 #include "chrome/browser/ui/views/extensions/extension_popup.h" 10 #include "chrome/browser/ui/views/extensions/extension_popup.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 // views::ContextMenuController: 111 // views::ContextMenuController:
112 virtual void ShowContextMenuForView(views::View* source, 112 virtual void ShowContextMenuForView(views::View* source,
113 const gfx::Point& point, 113 const gfx::Point& point,
114 ui::MenuSourceType source_type) OVERRIDE; 114 ui::MenuSourceType source_type) OVERRIDE;
115 115
116 // Shows the context menu for extension action. 116 // Shows the context menu for extension action.
117 void DoShowContextMenu(ui::MenuSourceType source_type); 117 void DoShowContextMenu(ui::MenuSourceType source_type);
118 118
119 // Shows the popup for the extension action, given the associated |popup_url|. 119 // Shows the popup for the extension action, given the associated |popup_url|.
120 // |grant_tab_permissions| is true if active tab permissions should be given
121 // to the extension; this is only true if the popup is opened through a user
122 // action.
120 // Returns true if a popup is successfully shown. 123 // Returns true if a popup is successfully shown.
121 bool ShowPopupWithUrl(ExtensionPopup::ShowAction show_action, 124 bool ShowPopupWithUrl(ExtensionPopup::ShowAction show_action,
122 const GURL& popup_url); 125 const GURL& popup_url,
126 bool grant_tab_permissions);
123 127
124 // Populates |command| with the command associated with |extension|, if one 128 // Populates |command| with the command associated with |extension|, if one
125 // exists. Returns true if |command| was populated. 129 // exists. Returns true if |command| was populated.
126 bool GetExtensionCommand(extensions::Command* command); 130 bool GetExtensionCommand(extensions::Command* command);
127 131
128 // Closes the currently-active menu, if needed. This is the case when there 132 // Closes the currently-active menu, if needed. This is the case when there
129 // is an active menu that wouldn't close automatically when a new one is 133 // is an active menu that wouldn't close automatically when a new one is
130 // opened. 134 // opened.
131 // Returns true if a menu was closed, false otherwise. 135 // Returns true if a menu was closed, false otherwise.
132 bool CloseActiveMenuIfNeeded(); 136 bool CloseActiveMenuIfNeeded();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // If non-NULL, this is the next ExtensionActionViewController context menu 172 // If non-NULL, this is the next ExtensionActionViewController context menu
169 // which wants to run once the current owner (this one) is done. 173 // which wants to run once the current owner (this one) is done.
170 base::Closure followup_context_menu_task_; 174 base::Closure followup_context_menu_task_;
171 175
172 base::WeakPtrFactory<ExtensionActionViewController> weak_factory_; 176 base::WeakPtrFactory<ExtensionActionViewController> weak_factory_;
173 177
174 DISALLOW_COPY_AND_ASSIGN(ExtensionActionViewController); 178 DISALLOW_COPY_AND_ASSIGN(ExtensionActionViewController);
175 }; 179 };
176 180
177 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H _ 181 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H _
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/extensions/extension_action_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698