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

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

Issue 10826242: Add local file system directory listings support for GTK content shell. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
« content/content_shell.gypi ('K') | « content/shell/DEPS ('k') | no next file » | 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 #include "content/shell/shell.h" 5 #include "content/shell/shell.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/string_piece.h" 12 #include "base/string_piece.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "content/public/browser/browser_context.h" 14 #include "content/public/browser/browser_context.h"
15 #include "content/public/browser/native_web_keyboard_event.h" 15 #include "content/public/browser/native_web_keyboard_event.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "content/public/browser/web_contents_view.h" 17 #include "content/public/browser/web_contents_view.h"
18 #include "content/public/common/renderer_preferences.h" 18 #include "content/public/common/renderer_preferences.h"
19 #include "content/shell/shell_switches.h" 19 #include "content/shell/shell_switches.h"
20 #include "grit/net_resources.h"
20 #include "third_party/skia/include/core/SkColor.h" 21 #include "third_party/skia/include/core/SkColor.h"
22 #include "ui/base/resource/resource_bundle.h"
21 23
22 namespace content { 24 namespace content {
23 25
24 void Shell::PlatformInitialize() { 26 void Shell::PlatformInitialize() {
25 } 27 }
26 28
27 base::StringPiece Shell::PlatformResourceProvider(int key) { 29 base::StringPiece Shell::PlatformResourceProvider(int key) {
28 NOTIMPLEMENTED(); 30 if (IDR_DIR_HEADER_HTML == key) {
31 base::StringPiece html_data =
32 ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
33 IDR_DIR_HEADER_HTML, ui::SCALE_FACTOR_NONE);
jam 2012/08/10 15:06:15 this code looks like it's cross platform (i.e. we
jam 2012/08/10 15:10:10 nvm, juts saw that Windows is the only one that ha
jam 2012/08/10 15:42:05 just tried this on Windows, and it worked. here's
34 return html_data;
35 }
29 return base::StringPiece(); 36 return base::StringPiece();
30 } 37 }
31 38
32 void Shell::PlatformCleanUp() { 39 void Shell::PlatformCleanUp() {
33 // Nothing to clean up; GTK will clean up the widgets shortly after. 40 // Nothing to clean up; GTK will clean up the widgets shortly after.
34 } 41 }
35 42
36 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { 43 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
37 GtkToolItem* item = NULL; 44 GtkToolItem* item = NULL;
38 switch (control) { 45 switch (control) {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 gtk_widget_grab_focus(GTK_WIDGET(url_edit_view_)); 238 gtk_widget_grab_focus(GTK_WIDGET(url_edit_view_));
232 return TRUE; 239 return TRUE;
233 } 240 }
234 241
235 void Shell::PlatformSetTitle(const string16& title) { 242 void Shell::PlatformSetTitle(const string16& title) {
236 std::string title_utf8 = UTF16ToUTF8(title); 243 std::string title_utf8 = UTF16ToUTF8(title);
237 gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str()); 244 gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str());
238 } 245 }
239 246
240 } // namespace content 247 } // namespace content
OLDNEW
« content/content_shell.gypi ('K') | « content/shell/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698