summaryrefslogtreecommitdiffstats
path: root/Tools/MiniBrowser
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-13 16:23:25 +0100
committerBen Murdoch <benm@google.com>2011-05-16 11:35:02 +0100
commit65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch)
treef478babb801e720de7bfaee23443ffe029f58731 /Tools/MiniBrowser
parent47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff)
downloadexternal_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Tools/MiniBrowser')
-rw-r--r--Tools/MiniBrowser/mac/BrowserWindowController.m3
-rw-r--r--Tools/MiniBrowser/qt/BrowserView.cpp10
-rw-r--r--Tools/MiniBrowser/qt/BrowserView.h2
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.cpp8
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.h2
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowser.pro8
-rw-r--r--Tools/MiniBrowser/win/BrowserView.cpp3
7 files changed, 16 insertions, 20 deletions
diff --git a/Tools/MiniBrowser/mac/BrowserWindowController.m b/Tools/MiniBrowser/mac/BrowserWindowController.m
index ad3fcab..e761624 100644
--- a/Tools/MiniBrowser/mac/BrowserWindowController.m
+++ b/Tools/MiniBrowser/mac/BrowserWindowController.m
@@ -637,7 +637,8 @@ static void runOpenPanel(WKPageRef page, WKFrameRef frame, WKOpenPanelParameters
0, /* didDraw */
0, /* pageDidScroll */
0, /* exceededDatabaseQuota */
- runOpenPanel
+ runOpenPanel,
+ 0, /* decidePolicyForGeolocationPermissionRequest */
};
WKPageSetPageUIClient(_webView.pageRef, &uiClient);
}
diff --git a/Tools/MiniBrowser/qt/BrowserView.cpp b/Tools/MiniBrowser/qt/BrowserView.cpp
index e6548ab..6118f79 100644
--- a/Tools/MiniBrowser/qt/BrowserView.cpp
+++ b/Tools/MiniBrowser/qt/BrowserView.cpp
@@ -30,15 +30,10 @@
#include <QGraphicsScene>
-static QWKPage* createNewPage(QWKPage* page)
-{
- return page;
-}
-
-BrowserView::BrowserView(QGraphicsWKView::BackingStoreType backingStoreType, QWidget* parent)
+BrowserView::BrowserView(QGraphicsWKView::BackingStoreType backingStoreType, QWKContext* context, QWidget* parent)
: QGraphicsView(parent)
, m_item(0)
- , m_context(new QWKContext(this))
+ , m_context(context ? context : new QWKContext(this))
{
m_item = new QGraphicsWKView(m_context, backingStoreType, 0);
setScene(new QGraphicsScene(this));
@@ -49,7 +44,6 @@ BrowserView::BrowserView(QGraphicsWKView::BackingStoreType backingStoreType, QWi
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
connect(m_item, SIGNAL(titleChanged(QString)), this, SLOT(setWindowTitle(QString)));
- m_item->page()->setCreateNewPageFunction(createNewPage);
}
void BrowserView::resizeEvent(QResizeEvent* event)
diff --git a/Tools/MiniBrowser/qt/BrowserView.h b/Tools/MiniBrowser/qt/BrowserView.h
index 7680aa7..e19cc59 100644
--- a/Tools/MiniBrowser/qt/BrowserView.h
+++ b/Tools/MiniBrowser/qt/BrowserView.h
@@ -37,7 +37,7 @@ class BrowserView : public QGraphicsView {
Q_OBJECT
public:
- BrowserView(QGraphicsWKView::BackingStoreType, QWidget* parent = 0);
+ BrowserView(QGraphicsWKView::BackingStoreType, QWKContext*, QWidget* parent = 0);
virtual ~BrowserView() { delete m_item; }
void load(const QString&);
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.cpp b/Tools/MiniBrowser/qt/BrowserWindow.cpp
index be08cae..c63c9d6 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.cpp
+++ b/Tools/MiniBrowser/qt/BrowserWindow.cpp
@@ -28,20 +28,20 @@
#include "BrowserWindow.h"
-static QWKPage* newPageFunction(QWKPage*)
+static QWKPage* newPageFunction(QWKPage* page)
{
- BrowserWindow* window = new BrowserWindow();
+ BrowserWindow* window = new BrowserWindow(page->context());
return window->page();
}
QGraphicsWKView::BackingStoreType BrowserWindow::backingStoreTypeForNewWindow = QGraphicsWKView::Simple;
-BrowserWindow::BrowserWindow()
+BrowserWindow::BrowserWindow(QWKContext* context)
{
setAttribute(Qt::WA_DeleteOnClose);
m_menu = new QMenuBar();
- m_browser = new BrowserView(backingStoreTypeForNewWindow);
+ m_browser = new BrowserView(backingStoreTypeForNewWindow, context);
m_addressBar = new QLineEdit();
m_menu->addAction("New Window", this, SLOT(newWindow()));
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.h b/Tools/MiniBrowser/qt/BrowserWindow.h
index 0010fbe..f984309 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.h
+++ b/Tools/MiniBrowser/qt/BrowserWindow.h
@@ -38,7 +38,7 @@ class BrowserWindow : public QMainWindow {
Q_OBJECT
public:
- BrowserWindow();
+ BrowserWindow(QWKContext* = 0);
~BrowserWindow();
void load(const QString& url);
diff --git a/Tools/MiniBrowser/qt/MiniBrowser.pro b/Tools/MiniBrowser/qt/MiniBrowser.pro
index 2cdd3b5..c297207 100644
--- a/Tools/MiniBrowser/qt/MiniBrowser.pro
+++ b/Tools/MiniBrowser/qt/MiniBrowser.pro
@@ -16,10 +16,10 @@ isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../..
include(../../../WebKit.pri)
INCLUDEPATH += \
- $$PWD/../../../WebKit2/ \
- $$PWD/../../../WebKit2/UIProcess/API/cpp \
- $$PWD/../../../WebKit2/UIProcess/API/C \
- $$PWD/../../../WebKit2/UIProcess/API/qt \
+ $$PWD/../../../Source/WebKit2/ \
+ $$PWD/../../../Source/WebKit2/UIProcess/API/cpp \
+ $$PWD/../../../Source/WebKit2/UIProcess/API/C \
+ $$PWD/../../../Source/WebKit2/UIProcess/API/qt \
$$OUTPUT_DIR/include
diff --git a/Tools/MiniBrowser/win/BrowserView.cpp b/Tools/MiniBrowser/win/BrowserView.cpp
index a93ca96..b9aaadc 100644
--- a/Tools/MiniBrowser/win/BrowserView.cpp
+++ b/Tools/MiniBrowser/win/BrowserView.cpp
@@ -118,7 +118,8 @@ void BrowserView::create(RECT webViewRect, BrowserWindow* parentWindow)
0, /* didDraw */
0, /* pageDidScroll */
0, /* exceededDatabaseQuota */
- 0 /* runOpenPanel */
+ 0, /* runOpenPanel */
+ 0, /* decidePolicyForGeolocationPermissionRequest */
};
WKPageSetPageUIClient(WKViewGetPage(m_webView), &uiClient);