#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/path.h"
#include "ui/base/models/simple_menu_model.h"
-#include "ui/views/controls/webview/webview.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/native_widget_win.h"
#include "ui/views/window/client_view.h"
base::DictionaryValue* options)
: NativeWindow(web_contents, options),
window_(new views::Widget),
- web_view_(new views::WebView(NULL)),
+ web_view_(inspectable_web_contents_view()->GetView()),
use_content_size_(false),
resizable_(true) {
options->GetBoolean(switches::kResizable, &resizable_);
window_->CenterWindow(size);
window_->UpdateWindowIcon();
- web_view_->SetWebContents(web_contents);
OnViewWasResized();
}
}
views::View* NativeWindowWin::GetInitiallyFocusedView() {
- return web_view_;
+ return inspectable_web_contents_view()->GetWebView();
}
bool NativeWindowWin::CanResize() const {
#include "ui/gfx/size.h"
#include "ui/views/focus/widget_focus_manager.h"
#include "ui/views/widget/widget_delegate.h"
+#include "vendor/brightray/browser/win/inspectable_web_contents_view_win.h"
namespace ui {
class MenuModel;
}
namespace views {
-class WebView;
class Widget;
}
// Set the native window menu.
void SetMenu(ui::MenuModel* menu_model);
+ brightray::InspectableWebContentsViewWin* inspectable_web_contents_view()
+ const {
+ return static_cast<brightray::InspectableWebContentsViewWin*>(
+ inspectable_web_contents()->GetView());
+ }
+
views::Widget* window() const { return window_.get(); }
atom::Menu2* menu() const { return menu_.get(); }
SkRegion* draggable_region() { return draggable_region_.get(); }
void RegisterAccelerators();
scoped_ptr<views::Widget> window_;
- views::WebView* web_view_; // managed by window_.
+ views::View* web_view_; // managed by window_.
// The window menu.
scoped_ptr<atom::Menu2> menu_;