Skip to content

Commit

Permalink
Revert "Fix linux javascript dialog"
Browse files Browse the repository at this point in the history
This reverts commit 5860b0d.
  • Loading branch information
rogerwang committed Jan 7, 2015
1 parent 5860b0d commit 1c21814
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 184 deletions.
10 changes: 0 additions & 10 deletions nw.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'<(DEPTH)/components/components.gyp:app_modal',
'<(DEPTH)/components/components.gyp:autofill_content_renderer',
'<(DEPTH)/components/components.gyp:keyed_service_content',
'<(DEPTH)/components/components_resources.gyp:components_resources',
Expand Down Expand Up @@ -78,7 +77,6 @@
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
'<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
'<(DEPTH)/third_party/WebKit/public/blink.gyp:blink',
'<(DEPTH)/components/components_strings.gyp:components_strings',
'nw_resources',
'commit_id',
],
Expand Down Expand Up @@ -122,11 +120,6 @@
'<(DEPTH)/chrome/browser/ui/cocoa/custom_frame_view.h',
'<(DEPTH)/chrome/browser/ui/cocoa/custom_frame_view.mm',
'<(DEPTH)/chrome/browser/ui/base_window.h',
'<(DEPTH)/chrome/browser/ui/views/chrome_javascript_native_dialog_factory_views.cc',
'<(DEPTH)/chrome/browser/ui/views/javascript_app_modal_dialog_views_x11.cc',
'<(DEPTH)/chrome/browser/ui/views/javascript_app_modal_dialog_views_x11.h',
'<(DEPTH)/chrome/browser/ui/views/javascript_app_modal_event_blocker_x11.cc',
'<(DEPTH)/chrome/browser/ui/views/javascript_app_modal_event_blocker_x11.h',
'<(DEPTH)/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.cc',
'<(DEPTH)/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h',
'<(DEPTH)/chrome/browser/ui/views/status_icons/status_icon_win.cc',
Expand Down Expand Up @@ -275,8 +268,6 @@
'src/browser/shell_download_manager_delegate.h',
'src/browser/shell_download_manager_delegate_win.cc',
'src/browser/shell_download_manager_delegate_mac.mm',
'src/browser/nw_constrained_window_views_client.cc',
'src/browser/nw_constrained_window_views_client.h',
'src/browser/shell_javascript_dialog_creator.cc',
'src/browser/shell_javascript_dialog_creator.h',
# 'src/browser/shell_javascript_dialog_gtk.cc',
Expand Down Expand Up @@ -666,7 +657,6 @@
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/components/strings/components_strings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
Expand Down
10 changes: 0 additions & 10 deletions src/browser/native_window_aura.cc
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,6 @@ gfx::Size NativeWindowFrameView::GetMaximumSize() const {

} // namespace

NativeWindowAura* NativeWindowAura::GetBrowserViewForNativeWindow(
gfx::NativeWindow window) {
views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
return widget ?
reinterpret_cast<NativeWindowAura*>(widget->GetNativeWindowProperty(
"__BROWSER_VIEW__")) : nullptr;
}

NativeWindowAura::NativeWindowAura(const base::WeakPtr<content::Shell>& shell,
base::DictionaryValue* manifest)
: NativeWindow(shell, manifest),
Expand Down Expand Up @@ -351,8 +343,6 @@ NativeWindowAura::NativeWindowAura(const base::WeakPtr<content::Shell>& shell,

OnViewWasResized();
window_->SetInitialFocus(ui::SHOW_STATE_NORMAL);

window_->SetNativeWindowProperty("__BROWSER_VIEW__", this);
}

NativeWindowAura::~NativeWindowAura() {
Expand Down
1 change: 0 additions & 1 deletion src/browser/native_window_aura.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class NativeWindowAura : public NativeWindow,
explicit NativeWindowAura(const base::WeakPtr<content::Shell>& shell,
base::DictionaryValue* manifest);
virtual ~NativeWindowAura();
static NativeWindowAura* GetBrowserViewForNativeWindow(gfx::NativeWindow window);

SkRegion* draggable_region() { return draggable_region_.get(); }
NativeWindowToolbarAura* toolbar() { return toolbar_; }
Expand Down
137 changes: 0 additions & 137 deletions src/browser/nw_constrained_window_views_client.cc

This file was deleted.

15 changes: 0 additions & 15 deletions src/browser/nw_constrained_window_views_client.h

This file was deleted.

5 changes: 0 additions & 5 deletions src/nw_shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"

#include "components/app_modal/javascript_dialog_manager.h"

#if defined(OS_WIN) || defined(OS_LINUX)
#include "content/nw/src/browser/native_window_aura.h"
Expand Down Expand Up @@ -653,13 +652,9 @@ void Shell::DidNavigateMainFramePostCommit(WebContents* web_contents) {
}

JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() {
#if defined(OS_LINUX)
return app_modal::JavaScriptDialogManager::GetInstance();
#else
if (!dialog_creator_.get())
dialog_creator_.reset(new ShellJavaScriptDialogCreator());
return dialog_creator_.get();
#endif
}

bool Shell::AddMessageToConsole(WebContents* source,
Expand Down
6 changes: 0 additions & 6 deletions src/shell_browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "content/nw/src/nw_package.h"
#include "content/nw/src/nw_shell.h"
#include "content/nw/src/shell_browser_context.h"
#include "content/nw/src/browser/nw_constrained_window_views_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "grit/net_resources.h"
Expand Down Expand Up @@ -69,8 +68,6 @@
#include "ui/views/linux_ui/linux_ui.h"
#endif

#include "chrome/browser/ui/app_modal/chrome_javascript_native_dialog_factory.h"

using base::MessageLoop;

namespace {
Expand Down Expand Up @@ -244,9 +241,6 @@ void ShellBrowserMainParts::Init() {
NULL,
MSG_ROUTING_NONE,
NULL);

InstallChromeJavaScriptNativeDialogFactory();
nw::InstallConstrainedWindowViewsClient();
}

bool ShellBrowserMainParts::ProcessSingletonNotificationCallback(
Expand Down

0 comments on commit 1c21814

Please sign in to comment.