Merge pull request #9535 from brenca/datalist-element
Add datalist element support
This commit is contained in:
commit
7d994f2a9e
22 changed files with 1704 additions and 55 deletions
|
@ -982,6 +982,23 @@ bool WebContents::OnMessageReceived(const IPC::Message& message) {
|
|||
return handled;
|
||||
}
|
||||
|
||||
bool WebContents::OnMessageReceived(const IPC::Message& message,
|
||||
content::RenderFrameHost* frame_host) {
|
||||
bool handled = true;
|
||||
auto relay = NativeWindowRelay::FromWebContents(web_contents());
|
||||
if (!relay)
|
||||
return false;
|
||||
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(NativeWindow, message, frame_host)
|
||||
IPC_MESSAGE_FORWARD(AtomAutofillFrameHostMsg_ShowPopup,
|
||||
relay->window.get(), NativeWindow::ShowAutofillPopup)
|
||||
IPC_MESSAGE_FORWARD(AtomAutofillFrameHostMsg_HidePopup,
|
||||
relay->window.get(), NativeWindow::HideAutofillPopup)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
IPC_END_MESSAGE_MAP()
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
// There are three ways of destroying a webContents:
|
||||
// 1. call webContents.destroy();
|
||||
// 2. garbage collection;
|
||||
|
@ -1621,6 +1638,10 @@ bool WebContents::IsOffScreen() const {
|
|||
return type_ == OFF_SCREEN;
|
||||
}
|
||||
|
||||
bool WebContents::IsOffScreenOrEmbedderOffscreen() const {
|
||||
return IsOffScreen() || (embedder_ && embedder_->IsOffScreen());
|
||||
}
|
||||
|
||||
void WebContents::OnPaint(const gfx::Rect& dirty_rect, const SkBitmap& bitmap) {
|
||||
Emit("paint", dirty_rect, gfx::Image::CreateFrom1xBitmap(bitmap));
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "atom/browser/api/save_page_handler.h"
|
||||
#include "atom/browser/api/trackable_object.h"
|
||||
#include "atom/browser/common_web_contents_delegate.h"
|
||||
#include "atom/browser/ui/autofill_popup.h"
|
||||
#include "content/common/cursors/webcursor.h"
|
||||
#include "content/public/browser/notification_observer.h"
|
||||
#include "content/public/browser/notification_registrar.h"
|
||||
|
@ -180,6 +181,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
|
||||
// Methods for offscreen rendering
|
||||
bool IsOffScreen() const;
|
||||
bool IsOffScreenOrEmbedderOffscreen() const;
|
||||
void OnPaint(const gfx::Rect& dirty_rect, const SkBitmap& bitmap);
|
||||
void StartPainting();
|
||||
void StopPainting();
|
||||
|
@ -329,6 +331,8 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
void DidFinishNavigation(
|
||||
content::NavigationHandle* navigation_handle) override;
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
bool OnMessageReceived(const IPC::Message& message,
|
||||
content::RenderFrameHost* frame_host) override;
|
||||
void WebContentsDestroyed() override;
|
||||
void NavigationEntryCommitted(
|
||||
const content::LoadCommittedDetails& load_details) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue