cc: Use LayerImpl instead of TiledLayerImpl in LTHI test.
[chromium-blink-merge.git] / chrome / browser / guest_view / ad_view / ad_view_guest.h
blob89a4229cac0a98668967002188f110c75429d140
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 #ifndef CHROME_BROWSER_GUEST_VIEW_AD_VIEW_AD_VIEW_GUEST_H_
6 #define CHROME_BROWSER_GUEST_VIEW_AD_VIEW_AD_VIEW_GUEST_H_
8 #include "base/values.h"
9 #include "chrome/browser/guest_view/guest_view.h"
11 // An AdViewGuest provides the browser-side implementation of the <adview> API
12 // and manages the dispatch of <adview> extension events. AdViewGuest is created
13 // on attachment. When a guest WebContents is associated with a particular
14 // embedder WebContents, we call this "attachment".
15 // TODO(fsamuel): There might be an opportunity here to refactor and reuse code
16 // between AdViewGuest and WebViewGuest.
17 class AdViewGuest : public GuestView<AdViewGuest> {
18 public:
19 AdViewGuest(int guest_instance_id,
20 content::WebContents* guest_web_contents,
21 const std::string& extension_id);
23 static const char Type[];
25 private:
26 virtual ~AdViewGuest();
28 virtual void DidCommitProvisionalLoadForFrame(
29 int64 frame_id,
30 const base::string16& frame_unique_name,
31 bool is_main_frame,
32 const GURL& url,
33 content::PageTransition transition_type,
34 content::RenderViewHost* render_view_host) OVERRIDE;
35 virtual void DidFailProvisionalLoad(
36 int64 frame_id,
37 const base::string16& frame_unique_name,
38 bool is_main_frame,
39 const GURL& validated_url,
40 int error_code,
41 const base::string16& error_description,
42 content::RenderViewHost* render_view_host) OVERRIDE;
44 DISALLOW_COPY_AND_ASSIGN(AdViewGuest);
47 #endif // CHROME_BROWSER_GUEST_VIEW_AD_VIEW_AD_VIEW_GUEST_H_