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

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

Issue 10913035: Add context popup menu support for content shell[GTK]. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix the Mac build Created 8 years, 3 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
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 #include "content/shell/shell_content_browser_client.h" 5 #include "content/shell/shell_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "content/public/browser/resource_dispatcher_host.h" 9 #include "content/public/browser/resource_dispatcher_host.h"
10 #include "content/shell/geolocation/shell_access_token_store.h" 10 #include "content/shell/geolocation/shell_access_token_store.h"
11 #include "content/shell/shell.h" 11 #include "content/shell/shell.h"
12 #include "content/shell/shell_browser_context.h" 12 #include "content/shell/shell_browser_context.h"
13 #include "content/shell/shell_browser_main_parts.h" 13 #include "content/shell/shell_browser_main_parts.h"
14 #include "content/shell/shell_devtools_delegate.h" 14 #include "content/shell/shell_devtools_delegate.h"
15 #include "content/shell/shell_resource_dispatcher_host_delegate.h" 15 #include "content/shell/shell_resource_dispatcher_host_delegate.h"
16 #include "content/shell/shell_switches.h" 16 #include "content/shell/shell_switches.h"
17 #include "content/shell/shell_web_contents_view_delegate_creator.h"
17 #include "content/shell/webkit_test_runner_host.h" 18 #include "content/shell/webkit_test_runner_host.h"
18 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
19 20
20 #if defined(OS_ANDROID) 21 #if defined(OS_ANDROID)
21 #include "base/android/path_utils.h" 22 #include "base/android/path_utils.h"
22 #include "base/path_service.h" 23 #include "base/path_service.h"
23 #include "base/platform_file.h" 24 #include "base/platform_file.h"
24 #include "content/shell/android/shell_descriptors.h" 25 #include "content/shell/android/shell_descriptors.h"
25 #endif 26 #endif
26 27
(...skipping 29 matching lines...) Expand all
56 resource_dispatcher_host_delegate_.reset( 57 resource_dispatcher_host_delegate_.reset(
57 new ShellResourceDispatcherHostDelegate()); 58 new ShellResourceDispatcherHostDelegate());
58 ResourceDispatcherHost::Get()->SetDelegate( 59 ResourceDispatcherHost::Get()->SetDelegate(
59 resource_dispatcher_host_delegate_.get()); 60 resource_dispatcher_host_delegate_.get());
60 } 61 }
61 62
62 std::string ShellContentBrowserClient::GetDefaultDownloadName() { 63 std::string ShellContentBrowserClient::GetDefaultDownloadName() {
63 return "download"; 64 return "download";
64 } 65 }
65 66
67 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate(
68 WebContents* web_contents) {
69 #if defined(TOOLKIT_GTK)
70 return CreateShellWebContentsViewDelegate(web_contents);
71 #endif
72 NOTIMPLEMENTED();
73 return NULL;
74 }
75
66 #if defined(OS_ANDROID) 76 #if defined(OS_ANDROID)
67 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 77 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
68 const CommandLine& command_line, 78 const CommandLine& command_line,
69 base::GlobalDescriptors::Mapping* mappings) { 79 base::GlobalDescriptors::Mapping* mappings) {
70 int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ; 80 int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ;
71 FilePath pak_file; 81 FilePath pak_file;
72 DCHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_file)); 82 DCHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_file));
73 pak_file = pak_file.Append(FILE_PATH_LITERAL("paks")); 83 pak_file = pak_file.Append(FILE_PATH_LITERAL("paks"));
74 pak_file = pak_file.Append(FILE_PATH_LITERAL("content_shell.pak")); 84 pak_file = pak_file.Append(FILE_PATH_LITERAL("content_shell.pak"));
75 85
(...skipping 15 matching lines...) Expand all
91 ShellBrowserContext* 101 ShellBrowserContext*
92 ShellContentBrowserClient::off_the_record_browser_context() { 102 ShellContentBrowserClient::off_the_record_browser_context() {
93 return shell_browser_main_parts_->off_the_record_browser_context(); 103 return shell_browser_main_parts_->off_the_record_browser_context();
94 } 104 }
95 105
96 AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() { 106 AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() {
97 return new ShellAccessTokenStore(browser_context()->GetRequestContext()); 107 return new ShellAccessTokenStore(browser_context()->GetRequestContext());
98 } 108 }
99 109
100 } // namespace content 110 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | content/shell/shell_web_contents_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698