mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Create 2272 release branch for CEF3.
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/2272@1993 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
50
libcef/browser/window_delegate_view.h
Normal file
50
libcef/browser/window_delegate_view.h
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright 2014 The Chromium Embedded Framework Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be found
|
||||
// in the LICENSE file.
|
||||
|
||||
#ifndef CEF_LIBCEF_BROWSER_WINDOW_DELEGATE_VIEW_H_
|
||||
#define CEF_LIBCEF_BROWSER_WINDOW_DELEGATE_VIEW_H_
|
||||
#pragma once
|
||||
|
||||
#include "ui/views/widget/widget_delegate.h"
|
||||
|
||||
namespace content {
|
||||
class WebContents;
|
||||
}
|
||||
|
||||
namespace views {
|
||||
class WebView;
|
||||
}
|
||||
|
||||
// Manages the views-based root window that hosts the web contents. This object
|
||||
// will be deleted automatically when the associated root window is destroyed.
|
||||
class CefWindowDelegateView : public views::WidgetDelegateView {
|
||||
public:
|
||||
explicit CefWindowDelegateView(SkColor background_color);
|
||||
|
||||
// Create the Widget and associated root window.
|
||||
void Init(gfx::AcceleratedWidget parent_widget,
|
||||
content::WebContents* web_contents,
|
||||
const gfx::Rect& bounds);
|
||||
|
||||
private:
|
||||
// Initialize the Widget's content.
|
||||
void InitContent();
|
||||
|
||||
// WidgetDelegateView methods:
|
||||
bool CanResize() const override { return true; }
|
||||
bool CanMaximize() const override { return true; }
|
||||
View* GetContentsView() override { return this; }
|
||||
|
||||
// View methods:
|
||||
void ViewHierarchyChanged(
|
||||
const ViewHierarchyChangedDetails& details) override;
|
||||
|
||||
private:
|
||||
SkColor background_color_;
|
||||
views::WebView* web_view_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefWindowDelegateView);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_WINDOW_DELEGATE_VIEW_H_
|
Reference in New Issue
Block a user