summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/views/bookmark_bubble_view.cc4
-rwxr-xr-xchrome/chrome.gyp2
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc11
-rw-r--r--views/widget/widget_gtk.cc5
-rw-r--r--views/widget/widget_gtk.h4
5 files changed, 13 insertions, 13 deletions
diff --git a/chrome/browser/views/bookmark_bubble_view.cc b/chrome/browser/views/bookmark_bubble_view.cc
index c85052f..f0acd1f 100644
--- a/chrome/browser/views/bookmark_bubble_view.cc
+++ b/chrome/browser/views/bookmark_bubble_view.cc
@@ -411,8 +411,8 @@ void BookmarkBubbleView::ShowEditor() {
// restored to the browser.
ShowWindow(GetWidget()->GetNativeView(), SW_HIDE);
#else
- NOTIMPLEMENTED(); // TODO(brettw) find the parent.
- gfx::NativeView parent = NULL;
+ gfx::NativeView parent = GTK_WIDGET(
+ static_cast<views::WidgetGtk*>(GetWidget())->GetTransientParent());
#endif
// Even though we just hid the window, we need to invoke Close to schedule
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index a14c311..fb39caf 100755
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -2691,6 +2691,8 @@
['include', '^browser/gtk/about_chrome_dialog.h'],
['include', '^browser/gtk/autocomplete_edit_gtk.cc'],
['include', '^browser/gtk/autocomplete_edit_gtk.h'],
+ ['include', '^browser/gtk/bookmark_editor_gtk.cc'],
+ ['include', '^browser/gtk/bookmark_editor_gtk.h'],
['include', '^browser/gtk/bookmark_manager_gtk.cc'],
['include', '^browser/gtk/bookmark_manager_gtk.h'],
['include', '^browser/gtk/bookmark_tree_model.cc'],
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index c36525b..4ab32eb 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -24,8 +24,6 @@
#endif
#if defined(TOOLKIT_VIEWS)
-#include "chrome/browser/bookmarks/bookmark_editor.h"
-#include "chrome/browser/bookmarks/bookmark_manager.h"
#include "chrome/browser/download/download_request_dialog_delegate.h"
#include "chrome/browser/download/download_request_manager.h"
#include "chrome/browser/tab_contents/constrained_window.h"
@@ -259,13 +257,4 @@ ConstrainedWindow* ConstrainedWindow::CreateConstrainedDialog(
return NULL;
}
-void BookmarkEditor::Show(gfx::NativeView parent_window,
- Profile* profile,
- const BookmarkNode* parent,
- const BookmarkNode* node,
- Configuration configuration,
- Handler* handler) {
- NOTIMPLEMENTED();
-}
-
#endif
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index b53cdc2..e79a994 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -129,6 +129,11 @@ WidgetGtk::~WidgetGtk() {
MessageLoopForUI::current()->RemoveObserver(this);
}
+GtkWindow* WidgetGtk::GetTransientParent() {
+ return (type_ != TYPE_CHILD && widget_) ?
+ gtk_window_get_transient_for(GTK_WINDOW(widget_)) : NULL;
+}
+
bool WidgetGtk::MakeTransparent() {
// Transparency can only be enabled for windows/popups and only if we haven't
// realized the widget.
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index f91befa..ccd3bd5 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -61,6 +61,10 @@ class WidgetGtk
transient_to_parent_ = true;
}
+ // Returns the transient parent. See make_transient_to_parent for details on
+ // what the transient parent is.
+ GtkWindow* GetTransientParent();
+
// Makes the background of the window totally transparent. This must be
// invoked before Init. This does a couple of checks and returns true if
// the window can be made transparent. The actual work of making the window