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

Side by Side Diff: chrome/browser/ui/panels/panel.cc

Issue 10777004: Support chrome.windows extension API events for browserless Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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 "chrome/browser/ui/panels/panel.h" 5 #include "chrome/browser/ui/panels/panel.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // See Panel::OnTitlebarClicked(). 566 // See Panel::OnTitlebarClicked().
567 if (active && IsDrawingAttention() && !IsMinimized()) 567 if (active && IsDrawingAttention() && !IsMinimized())
568 FlashFrame(false); 568 FlashFrame(false);
569 569
570 if (panel_strip_) 570 if (panel_strip_)
571 panel_strip_->OnPanelActiveStateChanged(this); 571 panel_strip_->OnPanelActiveStateChanged(this);
572 572
573 content::NotificationService::current()->Notify( 573 content::NotificationService::current()->Notify(
574 chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS, 574 chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
575 content::Source<Panel>(this), 575 content::Source<Panel>(this),
576 content::NotificationService::NoDetails()); 576 content::Details<bool>(&active));
577 } 577 }
578 578
579 void Panel::ConfigureAutoResize(content::WebContents* web_contents) { 579 void Panel::ConfigureAutoResize(content::WebContents* web_contents) {
580 if (!auto_resizable_ || !web_contents) 580 if (!auto_resizable_ || !web_contents)
581 return; 581 return;
582 582
583 // NULL might be returned if the tab has not been added. 583 // NULL might be returned if the tab has not been added.
584 RenderViewHost* render_view_host = web_contents->GetRenderViewHost(); 584 RenderViewHost* render_view_host = web_contents->GetRenderViewHost();
585 if (!render_view_host) 585 if (!render_view_host)
586 return; 586 return;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 678
679 void Panel::UpdateTitleBar() { 679 void Panel::UpdateTitleBar() {
680 native_panel_->UpdatePanelTitleBar(); 680 native_panel_->UpdatePanelTitleBar();
681 } 681 }
682 682
683 void Panel::LoadingStateChanged(bool is_loading) { 683 void Panel::LoadingStateChanged(bool is_loading) {
684 native_panel_->UpdatePanelLoadingAnimations(is_loading); 684 native_panel_->UpdatePanelLoadingAnimations(is_loading);
685 UpdateTitleBar(); 685 UpdateTitleBar();
686 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); 686 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading);
687 } 687 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698