| Index: chrome/browser/ui/panels/panel_browser_window_gtk.cc
|
| diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
|
| index b3363beb6ac7a2bb120852252e815bf5c4a1e7d4..acc5edfb987e6f0344fab96d8616208b9e0f3a32 100644
|
| --- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
|
| +++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
|
| @@ -28,10 +28,6 @@ const float kDrawAttentionRFraction = kDrawAttentionR / 255.0;
|
| const float kDrawAttentionGFraction = kDrawAttentionG / 255.0;
|
| const float kDrawAttentionBFraction = kDrawAttentionB / 255.0;
|
|
|
| -// Delay before click on a titlebar is allowed to minimize the panel after
|
| -// the 'draw attention' mode has been cleared.
|
| -const int kSuspendMinimizeOnClickIntervalMs = 500;
|
| -
|
| // Markup for title text in draw attention state. Set to color white.
|
| const char* const kDrawAttentionTitleMarkupPrefix =
|
| "<span fgcolor='#ffffff'>";
|
| @@ -247,14 +243,11 @@ void PanelBrowserWindowGtk::DrawAttentionFrame(cairo_t* cr,
|
| void PanelBrowserWindowGtk::ActiveWindowChanged(GdkWindow* active_window) {
|
| bool was_active = IsActive();
|
| BrowserWindowGtk::ActiveWindowChanged(active_window);
|
| - if (!window() || was_active == IsActive()) // State didn't change.
|
| + bool is_active = IsActive();
|
| + if (!window() || was_active == is_active) // State didn't change.
|
| return;
|
|
|
| - content::NotificationService::current()->Notify(
|
| - chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
|
| - content::Source<Panel>(panel_.get()),
|
| - content::NotificationService::NoDetails());
|
| - panel_->OnActiveStateChanged();
|
| + panel_->OnActiveStateChanged(is_active);
|
| }
|
|
|
| BrowserWindowGtk::TitleDecoration PanelBrowserWindowGtk::GetWindowTitle(
|
| @@ -575,44 +568,11 @@ gboolean PanelBrowserWindowGtk::OnTitlebarButtonReleaseEvent(
|
| if (event->button != 1)
|
| return TRUE;
|
|
|
| - if (event->state & GDK_CONTROL_MASK) {
|
| - panel_->OnTitlebarClicked(panel::APPLY_TO_ALL);
|
| - return TRUE;
|
| - }
|
| -
|
| - // TODO(jennb): Move remaining titlebar click handling out of here.
|
| - // (http://crbug.com/118431)
|
| - PanelStrip* panel_strip = panel_->panel_strip();
|
| - if (!panel_strip)
|
| - return TRUE;
|
| -
|
| - if (panel_strip->type() == PanelStrip::DOCKED &&
|
| - panel_->expansion_state() == Panel::EXPANDED) {
|
| - if (base::Time::Now() < disableMinimizeUntilTime_)
|
| - return TRUE;
|
| -
|
| - panel_->SetExpansionState(Panel::MINIMIZED);
|
| - } else {
|
| - panel_->Activate();
|
| - }
|
| -
|
| + panel_->OnTitlebarClicked((event->state & GDK_CONTROL_MASK) ?
|
| + panel::APPLY_TO_ALL : panel::NO_MODIFIER);
|
| return TRUE;
|
| }
|
|
|
| -void PanelBrowserWindowGtk::HandleFocusIn(GtkWidget* widget,
|
| - GdkEventFocus* event) {
|
| - BrowserWindowGtk::HandleFocusIn(widget, event);
|
| -
|
| - // Do not clear draw attention if user cannot see contents of panel.
|
| - if (!is_drawing_attention_ || panel_->IsMinimized())
|
| - return;
|
| -
|
| - panel_->FlashFrame(false);
|
| -
|
| - disableMinimizeUntilTime_ = base::Time::Now() +
|
| - base::TimeDelta::FromMilliseconds(kSuspendMinimizeOnClickIntervalMs);
|
| -}
|
| -
|
| // NativePanelTesting implementation.
|
| class NativePanelTestingGtk : public NativePanelTesting {
|
| public:
|
|
|