Explicitly add python-numpy dependency to install-build-deps.
[chromium-blink-merge.git] / components / devtools_bridge / client / web_client.cc
blobd323db52e332d2e24d5640ec21331847ab42b112
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/devtools_bridge/client/web_client.h"
6 #include "content/public/browser/web_contents.h"
7 #include "content/public/browser/web_contents_delegate.h"
9 namespace devtools_bridge {
11 namespace {
13 class WebClientImpl : public WebClient, private content::WebContentsDelegate {
14 public:
15 WebClientImpl(content::BrowserContext* context, Delegate* delegate);
17 private:
18 Delegate* const delegate_;
19 const scoped_ptr<content::WebContents> web_contents_;
22 WebClientImpl::WebClientImpl(content::BrowserContext* context,
23 Delegate* delegate)
24 : delegate_(delegate),
25 web_contents_(content::WebContents::Create(
26 content::WebContents::CreateParams(context))) {
27 web_contents_->SetDelegate(this);
30 } // namespace
32 scoped_ptr<WebClient> WebClient::CreateInstance(
33 content::BrowserContext* context, Delegate* delegate) {
34 return make_scoped_ptr(new WebClientImpl(context, delegate));
37 } // namespace devtools_bridge