Update broken references to image assets
[chromium-blink-merge.git] / extensions / browser / guest_view / extension_options / extension_options_guest.h
blob9cf37d26f21489e705af664a25d69837d409c2ab
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 EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_
8 #include "base/macros.h"
9 #include "components/guest_view/browser/guest_view.h"
10 #include "extensions/browser/guest_view/extension_options/extension_options_guest_delegate.h"
11 #include "url/gurl.h"
13 namespace content {
14 class BrowserContext;
17 namespace extensions {
19 class ExtensionOptionsGuest
20 : public guest_view::GuestView<ExtensionOptionsGuest> {
21 public:
22 static const char Type[];
23 static guest_view::GuestViewBase* Create(
24 content::WebContents* owner_web_contents);
26 // GuestViewBase implementation.
27 bool CanRunInDetachedState() const override;
28 void CreateWebContents(const base::DictionaryValue& create_params,
29 const WebContentsCreatedCallback& callback) override;
30 void DidInitialize(const base::DictionaryValue& create_params) override;
31 void GuestViewDidStopLoading() override;
32 const char* GetAPINamespace() const override;
33 int GetTaskPrefix() const override;
34 bool IsPreferredSizeModeEnabled() const override;
35 void OnPreferredSizeChanged(const gfx::Size& pref_size) override;
36 bool ShouldHandleFindRequestsForEmbedder() const override;
38 // content::WebContentsDelegate implementation.
39 content::WebContents* OpenURLFromTab(
40 content::WebContents* source,
41 const content::OpenURLParams& params) override;
42 void CloseContents(content::WebContents* source) override;
43 bool HandleContextMenu(const content::ContextMenuParams& params) override;
44 bool ShouldCreateWebContents(
45 content::WebContents* web_contents,
46 int route_id,
47 int main_frame_route_id,
48 WindowContainerType window_container_type,
49 const std::string& frame_name,
50 const GURL& target_url,
51 const std::string& partition_id,
52 content::SessionStorageNamespace* session_storage_namespace) override;
54 // content::WebContentsObserver implementation.
55 void DidNavigateMainFrame(
56 const content::LoadCommittedDetails& details,
57 const content::FrameNavigateParams& params) override;
59 private:
60 explicit ExtensionOptionsGuest(content::WebContents* owner_web_contents);
61 ~ExtensionOptionsGuest() override;
63 scoped_ptr<extensions::ExtensionOptionsGuestDelegate>
64 extension_options_guest_delegate_;
65 GURL options_page_;
67 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest);
70 } // namespace extensions
72 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_