summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 23:46:22 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 23:46:22 +0000
commit2c4410df7aaa0ed2c50edb1107c085098124fc99 (patch)
tree58f235bf5a6fb9f35053f08260fc91a3ff5c00ff /chrome/renderer
parent21e9e6d3296ea4198352619ed7a71cb92bc845de (diff)
downloadchromium_src-2c4410df7aaa0ed2c50edb1107c085098124fc99.zip
chromium_src-2c4410df7aaa0ed2c50edb1107c085098124fc99.tar.gz
chromium_src-2c4410df7aaa0ed2c50edb1107c085098124fc99.tar.bz2
Popup whitelisting checkpoint.
This provides some basic UI for the popup whitelist. The actual whitelist is completely unimplemented and just has TODOs at the hook points. The actual blocking behavior of the browser is unchanged. The popup blocker bubble menu now gets an extra section below the popups with checkable "Always show popups from <host>" items (usually one, can be more on pages with popups from iframes from different hosts). Clicking one of these will whitelist a hostname and open its popups, and remove it from the menu. When navigating to a page with whitelisted popups, the popup blocker bubble is opened (showing "Blocked Popups: 0", text subject to change), and the menu contains the checked entr(y/ies) relevant to these page. Clicking one of these un-whitelists the host and removes the entry from the menu (closing the menu if that was the last such entry). Known UI questions: * Wording is all speculative * Should manually closing all popups associated with a whitelisted site remove that entry/close the menu automatically? (I suspect yes) * Should un-whitelisting a site via the menu entry close its popups, just like whitelisting it opens them? (Not sure) * Should menu items for sites stick around after toggling their whitelisting status, thus keeping the bubble onscreen until it's manually closed, the page is navigated, etc.? (While this is slightly more consistent, I suspect the answer is no) BUG=11440 Review URL: http://codereview.chromium.org/113058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc8
-rw-r--r--chrome/renderer/render_view.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index d173537..03df749 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -418,8 +418,8 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
OnDisassociateFromPopupCount)
IPC_MESSAGE_HANDLER(ViewMsg_AutofillSuggestions,
OnReceivedAutofillSuggestions)
- IPC_MESSAGE_HANDLER(ViewMsg_PopupNotificationVisiblityChanged,
- OnPopupNotificationVisiblityChanged)
+ IPC_MESSAGE_HANDLER(ViewMsg_PopupNotificationVisibilityChanged,
+ OnPopupNotificationVisibilityChanged)
IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
IPC_MESSAGE_HANDLER(ViewMsg_ExtensionResponse, OnExtensionResponse)
IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode)
@@ -1698,7 +1698,7 @@ void RenderView::OnReceivedAutofillSuggestions(
default_suggestion_index);
}
-void RenderView::OnPopupNotificationVisiblityChanged(bool visible) {
+void RenderView::OnPopupNotificationVisibilityChanged(bool visible) {
popup_notification_visible_ = visible;
}
@@ -1956,7 +1956,7 @@ void RenderView::Show(WebWidget* webwidget, WindowOpenDisposition disposition) {
}
void RenderView::CloseWidgetSoon(WebWidget* webwidget) {
- if (popup_notification_visible_ == false)
+ if (!popup_notification_visible_)
RenderWidget::CloseWidgetSoon(webwidget);
}
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 8c34769..bdd415c 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -557,7 +557,7 @@ class RenderView : public RenderWidget,
int default_suggestions_index);
// Message that the popup notification has been shown or hidden.
- void OnPopupNotificationVisiblityChanged(bool visible);
+ void OnPopupNotificationVisibilityChanged(bool visible);
// Handles messages posted from automation.
void OnMessageFromExternalHost(const std::string& message,
@@ -765,7 +765,7 @@ class RenderView : public RenderWidget,
// We need to prevent windows from closing themselves with a window.close()
// call while a blocked popup notification is being displayed. We cannot
- // synchronously querry the Browser process. We cannot wait for the Browser
+ // synchronously query the Browser process. We cannot wait for the Browser
// process to send a message to us saying that a blocked popup notification
// is being displayed. We instead assume that when we create a window off
// this RenderView, that it is going to be blocked until we get a message