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

Unified Diff: chrome/browser/tab_contents/tab_contents.h

Issue 373006: Implement window.alert() and its cousins for extensions.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/jsmessage_box_handler.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents.h
===================================================================
--- chrome/browser/tab_contents/tab_contents.h (revision 31156)
+++ chrome/browser/tab_contents/tab_contents.h (working copy)
@@ -22,6 +22,7 @@
#include "chrome/browser/download/save_package.h"
#include "chrome/browser/fav_icon_helper.h"
#include "chrome/browser/find_notification_details.h"
+#include "chrome/browser/jsmessage_box_client.h"
#include "chrome/browser/shell_dialogs.h"
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/browser/tab_contents/constrained_window.h"
@@ -97,7 +98,8 @@
public RenderViewHostDelegate::BrowserIntegration,
public RenderViewHostDelegate::Resource,
public RenderViewHostManager::Delegate,
- public SelectFileDialog::Listener {
+ public SelectFileDialog::Listener,
+ public JavaScriptMessageBoxClient {
public:
// Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it
// what has changed. Combine them to update more than one thing.
@@ -533,11 +535,6 @@
suppress_javascript_messages_ = suppress_javascript_messages;
}
- // AppModalDialog calls this when the dialog is closed.
- void OnJavaScriptMessageBoxClosed(IPC::Message* reply_msg,
- bool success,
- const std::wstring& prompt);
-
// Prepare for saving the current web page to disk.
void OnSavePage();
@@ -958,6 +955,17 @@
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.
« no previous file with comments | « chrome/browser/jsmessage_box_handler.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698