diff --git a/atom/app/atom_main.cc b/atom/app/atom_main.cc index d63d39bfe008..082913620b03 100644 --- a/atom/app/atom_main.cc +++ b/atom/app/atom_main.cc @@ -98,7 +98,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { sandbox::SandboxInterfaceInfo sandbox_info = {0}; content::InitializeSandboxInfo(&sandbox_info); atom::AtomMainDelegate delegate; - return content::ContentMain(instance, &sandbox_info, &delegate); + return content::ContentMain(content::ContentMainParams(&delegate)); } #elif defined(OS_LINUX) // defined(OS_WIN) @@ -109,7 +109,7 @@ int main(int argc, const char* argv[]) { return node::Start(argc, const_cast(argv)); atom::AtomMainDelegate delegate; - return content::ContentMain(argc, argv, &delegate); + return content::ContentMain(content::ContentMainParams(&delegate)); } #else // defined(OS_LINUX) diff --git a/atom/browser/ui/gtk/app_indicator_icon.cc b/atom/browser/ui/gtk/app_indicator_icon.cc index 1c88b29065b8..4ab1dd3a3985 100644 --- a/atom/browser/ui/gtk/app_indicator_icon.cc +++ b/atom/browser/ui/gtk/app_indicator_icon.cc @@ -137,13 +137,12 @@ base::FilePath CreateTempImageFile(gfx::ImageSkia* image_ptr, // Create a new temporary directory for each image since using a single // temporary directory seems to have issues when changing icons in quick // succession. - if (!file_util::CreateNewTempDirectory(base::FilePath::StringType(), - &temp_dir)) + if (!base::CreateNewTempDirectory(base::FilePath::StringType(), &temp_dir)) return base::FilePath(); new_file_path = temp_dir.Append(id + base::StringPrintf("_%d.png", icon_change_count)); int bytes_written = - file_util::WriteFile( + base::WriteFile( new_file_path, reinterpret_cast(png_data->front()), png_data->size()); diff --git a/chrome/browser/ui/gtk/gtk_window_util.cc b/chrome/browser/ui/gtk/gtk_window_util.cc index 09d2624b5df2..bce160a288df 100644 --- a/chrome/browser/ui/gtk/gtk_window_util.cc +++ b/chrome/browser/ui/gtk/gtk_window_util.cc @@ -23,44 +23,6 @@ static guint32 last_click_time; static int last_click_x; static int last_click_y; -// Performs Cut/Copy/Paste operation on the |window|. -// If the current render view is focused, then just call the specified |method| -// against the current render view host, otherwise emit the specified |signal| -// against the focused widget. -// TODO(suzhe): This approach does not work for plugins. -void DoCutCopyPaste(GtkWindow* window, - WebContents* web_contents, - void (RenderWidgetHost::*method)(), - const char* signal) { - GtkWidget* widget = gtk_window_get_focus(window); - if (widget == NULL) - return; // Do nothing if no focused widget. - - if (web_contents && - widget == web_contents->GetView()->GetContentNativeView()) { - (web_contents->GetRenderViewHost()->*method)(); - } else { - guint id; - if ((id = g_signal_lookup(signal, G_OBJECT_TYPE(widget))) != 0) - g_signal_emit(widget, id, 0); - } -} - -void DoCut(GtkWindow* window, WebContents* web_contents) { - DoCutCopyPaste(window, web_contents, - &RenderWidgetHost::Cut, "cut-clipboard"); -} - -void DoCopy(GtkWindow* window, WebContents* web_contents) { - DoCutCopyPaste(window, web_contents, - &RenderWidgetHost::Copy, "copy-clipboard"); -} - -void DoPaste(GtkWindow* window, WebContents* web_contents) { - DoCutCopyPaste(window, web_contents, - &RenderWidgetHost::Paste, "paste-clipboard"); -} - // Ubuntu patches their version of GTK+ so that there is always a // gripper in the bottom right corner of the window. We dynamically // look up this symbol because it's a non-standard Ubuntu extension to diff --git a/chrome/browser/ui/gtk/gtk_window_util.h b/chrome/browser/ui/gtk/gtk_window_util.h index d4904ca8e947..a3e855cd7f37 100644 --- a/chrome/browser/ui/gtk/gtk_window_util.h +++ b/chrome/browser/ui/gtk/gtk_window_util.h @@ -22,11 +22,6 @@ extern const int kFrameBorderThickness; // the 16 px at the end of each edge triggers diagonal resizing. extern const int kResizeAreaCornerSize; -// Performs Cut/Copy/Paste operation on the |window|'s |web_contents|. -void DoCut(GtkWindow* window, content::WebContents* web_contents); -void DoCopy(GtkWindow* window, content::WebContents* web_contents); -void DoPaste(GtkWindow* window, content::WebContents* web_contents); - // Ubuntu patches their version of GTK+ to that there is always a // gripper in the bottom right corner of the window. We always need to // disable this feature since we can't communicate this to WebKit easily.