Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: chrome/browser/guest_view/mime_handler_view/mime_handler_view_guest.h

Issue 376033002: Adding MimeHandlerView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pending-zork-patch2
Patch Set: remove some printfs. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_H_
6 #define CHROME_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_H_
7
8 #include "chrome/browser/guest_view/guest_view.h"
9
10 #include "extensions/browser/extension_function_dispatcher.h"
11
12 class MimeHandlerViewGuest : public GuestView<MimeHandlerViewGuest>,
13 public extensions::ExtensionFunctionDispatcher::Del egate {
14 public:
15 static const char Type[];
16
17 MimeHandlerViewGuest(content::BrowserContext* browser_context,
18 int guest_instance_id);
19
20 // GuestViewBase implementation.
21 virtual void CreateWebContents(
22 const std::string& embedder_extension_id,
23 int embedder_render_process_id,
24 const base::DictionaryValue& create_params,
25 const WebContentsCreatedCallback& callback) OVERRIDE;
26 virtual void DidAttachToEmbedder() OVERRIDE;
27 virtual void WillAttachToEmbedder() OVERRIDE;
28 virtual void DidInitialize() OVERRIDE;
29
30 // content::WebContentsObserver implementation.
31 virtual bool OnMessageReceived(
32 const IPC::Message& message) OVERRIDE;
33
34 // ExtensionFunctionDispatcher::Delegate implementation.
35 virtual extensions::WindowController* GetExtensionWindowController() const OVE RRIDE;
36 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE;
37
38 private:
39 virtual ~MimeHandlerViewGuest();
40
41 void AttachWebContentsHelpers(content::WebContents* contents);
42 void NavigateGuest(const std::string& src);
43 GURL ResolveURL(const std::string& url);
44 void LoadURLWithParams(const GURL& url,
45 const content::Referrer& referrer,
46 content::PageTransition transition_type,
47 content::WebContents* web_contents);
48
49 void PushMimeHandlerViewStateToIOThread();
50 void OnRequest(const ExtensionHostMsg_Request_Params& params);
51
52 scoped_ptr<extensions::ExtensionFunctionDispatcher>
53 extension_function_dispatcher_;
54
55 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest);
56 };
57
58 #endif // CHROME_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698