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

Side by Side Diff: content/shell/shell_content_browser_client.h

Issue 13818008: [content shell] only send the hyphenation file after the process was created (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/shell/shell_content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/platform_file.h" 13 #include "base/platform_file.h"
14 #include "content/public/browser/content_browser_client.h" 14 #include "content/public/browser/content_browser_client.h"
15 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h"
15 17
16 namespace content { 18 namespace content {
17 19
18 class ShellBrowserContext; 20 class ShellBrowserContext;
19 class ShellBrowserMainParts; 21 class ShellBrowserMainParts;
20 class ShellResourceDispatcherHostDelegate; 22 class ShellResourceDispatcherHostDelegate;
21 23
22 class ShellContentBrowserClient : public ContentBrowserClient { 24 class ShellContentBrowserClient : public ContentBrowserClient,
25 public NotificationObserver {
23 public: 26 public:
24 // Gets the current instance. 27 // Gets the current instance.
25 static ShellContentBrowserClient* Get(); 28 static ShellContentBrowserClient* Get();
26 29
27 ShellContentBrowserClient(); 30 ShellContentBrowserClient();
28 virtual ~ShellContentBrowserClient(); 31 virtual ~ShellContentBrowserClient();
29 32
30 // ContentBrowserClient overrides. 33 // ContentBrowserClient overrides.
31 virtual BrowserMainParts* CreateBrowserMainParts( 34 virtual BrowserMainParts* CreateBrowserMainParts(
32 const MainFunctionParams& parameters) OVERRIDE; 35 const MainFunctionParams& parameters) OVERRIDE;
(...skipping 20 matching lines...) Expand all
53 WebContents* web_contents) OVERRIDE; 56 WebContents* web_contents) OVERRIDE;
54 virtual QuotaPermissionContext* CreateQuotaPermissionContext() OVERRIDE; 57 virtual QuotaPermissionContext* CreateQuotaPermissionContext() OVERRIDE;
55 58
56 #if defined(OS_ANDROID) 59 #if defined(OS_ANDROID)
57 virtual void GetAdditionalMappedFilesForChildProcess( 60 virtual void GetAdditionalMappedFilesForChildProcess(
58 const CommandLine& command_line, 61 const CommandLine& command_line,
59 int child_process_id, 62 int child_process_id,
60 std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE; 63 std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE;
61 #endif 64 #endif
62 65
66 // NotificationObserver implementation.
67 virtual void Observe(int type,
68 const NotificationSource& source,
69 const NotificationDetails& details) OVERRIDE;
70
63 ShellBrowserContext* browser_context(); 71 ShellBrowserContext* browser_context();
64 ShellBrowserContext* off_the_record_browser_context(); 72 ShellBrowserContext* off_the_record_browser_context();
65 ShellResourceDispatcherHostDelegate* resource_dispatcher_host_delegate() { 73 ShellResourceDispatcherHostDelegate* resource_dispatcher_host_delegate() {
66 return resource_dispatcher_host_delegate_.get(); 74 return resource_dispatcher_host_delegate_.get();
67 } 75 }
68 ShellBrowserMainParts* shell_browser_main_parts() { 76 ShellBrowserMainParts* shell_browser_main_parts() {
69 return shell_browser_main_parts_; 77 return shell_browser_main_parts_;
70 } 78 }
71 79
72 private: 80 private:
73 ShellBrowserContext* ShellBrowserContextForBrowserContext( 81 ShellBrowserContext* ShellBrowserContextForBrowserContext(
74 BrowserContext* content_browser_context); 82 BrowserContext* content_browser_context);
75 83
76 scoped_ptr<ShellResourceDispatcherHostDelegate> 84 scoped_ptr<ShellResourceDispatcherHostDelegate>
77 resource_dispatcher_host_delegate_; 85 resource_dispatcher_host_delegate_;
78 86
79 base::FilePath webkit_source_dir_; 87 base::FilePath webkit_source_dir_;
80 88
81 base::PlatformFile hyphen_dictionary_file_; 89 base::PlatformFile hyphen_dictionary_file_;
82 90
83 ShellBrowserMainParts* shell_browser_main_parts_; 91 ShellBrowserMainParts* shell_browser_main_parts_;
92
93 NotificationRegistrar registrar_;
84 }; 94 };
85 95
86 } // namespace content 96 } // namespace content
87 97
88 #endif // CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ 98 #endif // CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | content/shell/shell_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698