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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 6289009: [Mac] Implement the system dictionary popup by implementing NSTextInput methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Clang Created 9 years, 7 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 | chrome/browser/renderer_host/render_widget_host_view_gtk.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include "chrome/browser/debugger/devtools_handler.h" 7 #include "chrome/browser/debugger/devtools_handler.h"
8 #include "chrome/browser/desktop_notification_handler.h" 8 #include "chrome/browser/desktop_notification_handler.h"
9 #include "chrome/browser/extensions/extension_message_handler.h" 9 #include "chrome/browser/extensions/extension_message_handler.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
11 #include "chrome/browser/printing/printing_message_filter.h" 11 #include "chrome/browser/printing/printing_message_filter.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" 13 #include "chrome/browser/renderer_host/chrome_render_message_filter.h"
14 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" 14 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h"
15 #include "chrome/browser/renderer_host/text_input_client_message_filter.h"
15 #include "chrome/browser/search_engines/search_provider_install_state_message_fi lter.h" 16 #include "chrome/browser/search_engines/search_provider_install_state_message_fi lter.h"
16 #include "chrome/browser/spellcheck_message_filter.h" 17 #include "chrome/browser/spellcheck_message_filter.h"
17 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" 18 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h"
18 #include "content/browser/renderer_host/browser_render_process_host.h" 19 #include "content/browser/renderer_host/browser_render_process_host.h"
19 #include "content/browser/renderer_host/render_view_host.h" 20 #include "content/browser/renderer_host/render_view_host.h"
20 21
21 namespace chrome { 22 namespace chrome {
22 23
23 void ChromeContentBrowserClient::RenderViewHostCreated( 24 void ChromeContentBrowserClient::RenderViewHostCreated(
24 RenderViewHost* render_view_host) { 25 RenderViewHost* render_view_host) {
(...skipping 24 matching lines...) Expand all
49 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( 50 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated(
50 BrowserRenderProcessHost* host) { 51 BrowserRenderProcessHost* host) {
51 host->channel()->AddFilter(new ChromeRenderMessageFilter( 52 host->channel()->AddFilter(new ChromeRenderMessageFilter(
52 host->id(), 53 host->id(),
53 host->profile(), 54 host->profile(),
54 host->profile()->GetRequestContextForRenderProcess(host->id()))); 55 host->profile()->GetRequestContextForRenderProcess(host->id())));
55 host->channel()->AddFilter(new PrintingMessageFilter()); 56 host->channel()->AddFilter(new PrintingMessageFilter());
56 host->channel()->AddFilter( 57 host->channel()->AddFilter(
57 new SearchProviderInstallStateMessageFilter(host->id(), host->profile())); 58 new SearchProviderInstallStateMessageFilter(host->id(), host->profile()));
58 host->channel()->AddFilter(new SpellCheckMessageFilter()); 59 host->channel()->AddFilter(new SpellCheckMessageFilter());
60
61 #if defined(OS_MACOSX)
62 host->channel()->AddFilter(new TextInputClientMessageFilter(host->id()));
63 #endif
59 } 64 }
60 65
61 content::WebUIFactory* ChromeContentBrowserClient::GetWebUIFactory() { 66 content::WebUIFactory* ChromeContentBrowserClient::GetWebUIFactory() {
62 return ChromeWebUIFactory::GetInstance(); 67 return ChromeWebUIFactory::GetInstance();
63 } 68 }
64 69
65 GURL ChromeContentBrowserClient::GetEffectiveURL(Profile* profile, 70 GURL ChromeContentBrowserClient::GetEffectiveURL(Profile* profile,
66 const GURL& url) { 71 const GURL& url) {
67 // Get the effective URL for the given actual URL. If the URL is part of an 72 // Get the effective URL for the given actual URL. If the URL is part of an
68 // installed app, the effective URL is an extension URL with the ID of that 73 // installed app, the effective URL is an extension URL with the ID of that
69 // extension as the host. This has the effect of grouping apps together in 74 // extension as the host. This has the effect of grouping apps together in
70 // a common SiteInstance. 75 // a common SiteInstance.
71 if (!profile || !profile->GetExtensionService()) 76 if (!profile || !profile->GetExtensionService())
72 return url; 77 return url;
73 78
74 const Extension* extension = 79 const Extension* extension =
75 profile->GetExtensionService()->GetExtensionByWebExtent(url); 80 profile->GetExtensionService()->GetExtensionByWebExtent(url);
76 if (!extension) 81 if (!extension)
77 return url; 82 return url;
78 83
79 // If the URL is part of an extension's web extent, convert it to an 84 // If the URL is part of an extension's web extent, convert it to an
80 // extension URL. 85 // extension URL.
81 return extension->GetResourceURL(url.path()); 86 return extension->GetResourceURL(url.path());
82 } 87 }
83 88
84 } // namespace chrome 89 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698