summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 00:19:54 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 00:19:54 +0000
commit66bd33dbf76732655a7d5b156b895e78274ea1bc (patch)
tree79c13921ae5b0f3a5e6e56bdba73fe5402453e56 /chrome/browser/tab_contents
parent489853ce6239d4333923c6f4d7a1d6ae0284fe88 (diff)
downloadchromium_src-66bd33dbf76732655a7d5b156b895e78274ea1bc.zip
chromium_src-66bd33dbf76732655a7d5b156b895e78274ea1bc.tar.gz
chromium_src-66bd33dbf76732655a7d5b156b895e78274ea1bc.tar.bz2
Fix crash when an extension popup shows a JS alert. Showing the alert takes...
Landing this on for pam. Original issue: http://codereview.chromium.org/425011/show. Disable showing JS alerts from popups, because doing so makes the popup disappear immediately, which has all sorts of unfortunate side effects for the poor orphaned alert (see bug for details). BUG=27758 TEST=create extension with popup, put link with |onclick="alert('test');"| in it; install extension, open popup, and click link; see no crash (nor popup) Review URL: http://codereview.chromium.org/435010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 33dae8a..50aae3f 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -631,6 +631,17 @@ class TabContents : public PageNavigator,
return request_context_;
}
+ // JavaScriptMessageBoxClient ------------------------------------------------
+ virtual std::wstring GetMessageBoxTitle(const GURL& frame_url,
+ bool is_alert);
+ virtual gfx::NativeWindow GetMessageBoxRootWindow();
+ virtual void OnMessageBoxClosed(IPC::Message* reply_msg,
+ bool success,
+ const std::wstring& prompt);
+ virtual void SetSuppressMessageBoxes(bool suppress_message_boxes);
+ virtual TabContents* AsTabContents() { return this; }
+ virtual ExtensionHost* AsExtensionHost() { return NULL; }
+
private:
friend class NavigationController;
// Used to access the child_windows_ (ConstrainedWindowList) for testing
@@ -951,17 +962,6 @@ class TabContents : public PageNavigator,
const NotificationSource& source,
const NotificationDetails& details);
-
- // JavaScriptMessageBoxClient ------------------------------------------------
- virtual std::wstring GetMessageBoxTitle(const GURL& frame_url,
- bool is_alert);
- virtual gfx::NativeWindow GetMessageBoxRootWindow();
- virtual void OnMessageBoxClosed(IPC::Message* reply_msg,
- bool success,
- const std::wstring& prompt);
- virtual void SetSuppressMessageBoxes(bool suppress_message_boxes);
- virtual TabContents* AsTabContents() { return this; }
-
// Data for core operation ---------------------------------------------------
// Delegate for notifying our owner about stuff. Not owned by us.