forked from nwjs/nw.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell_content_browser_client.h
More file actions
68 lines (57 loc) · 2.53 KB
/
shell_content_browser_client.h
File metadata and controls
68 lines (57 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
#define CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
#include <string>
#include <map>
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/content_browser_client.h"
namespace content {
class ShellBrowserContext;
class ShellBrowserMainParts;
class ShellResourceDispatcherHostDelegate;
class ShellContentBrowserClient : public ContentBrowserClient {
public:
ShellContentBrowserClient();
virtual ~ShellContentBrowserClient();
// ContentBrowserClient overrides.
virtual BrowserMainParts* CreateBrowserMainParts(
const MainFunctionParams& parameters) OVERRIDE;
virtual void RenderViewHostCreated(
RenderViewHost* render_view_host) OVERRIDE;
virtual WebContentsView* OverrideCreateWebContentsView(
WebContents* web_contents,
RenderViewHostDelegateView** render_view_host_delegate_view) OVERRIDE;
virtual std::string GetApplicationLocale() OVERRIDE;
virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
int child_process_id) OVERRIDE;
virtual void ResourceDispatcherHostCreated() OVERRIDE;
virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
virtual void OverrideWebkitPrefs(
RenderViewHost* render_view_host,
const GURL& url,
webkit_glue::WebPreferences* prefs) OVERRIDE;
virtual std::string GetDefaultDownloadName() OVERRIDE;
virtual MediaObserver* GetMediaObserver() OVERRIDE;
virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) OVERRIDE;
virtual bool ShouldTryToUseExistingProcessHost(
BrowserContext* browser_context, const GURL& url) OVERRIDE;
virtual bool IsSuitableHost(RenderProcessHost* process_host,
const GURL& site_url) OVERRIDE;
ShellBrowserContext* browser_context();
ShellBrowserContext* off_the_record_browser_context();
ShellResourceDispatcherHostDelegate* resource_dispatcher_host_delegate() {
return resource_dispatcher_host_delegate_.get();
}
ShellBrowserMainParts* shell_browser_main_parts() {
return shell_browser_main_parts_;
}
private:
scoped_ptr<ShellResourceDispatcherHostDelegate>
resource_dispatcher_host_delegate_;
ShellBrowserMainParts* shell_browser_main_parts_;
};
} // namespace content
#endif // CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_