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

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

Issue 8503037: Fix the problem that notifications and panels overlap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_prefs.h" 8 #include "chrome/browser/extensions/extension_prefs.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 const Extension* Panel::GetExtension() const { 57 const Extension* Panel::GetExtension() const {
58 return GetExtensionFromBrowser(browser()); 58 return GetExtensionFromBrowser(browser());
59 } 59 }
60 60
61 void Panel::SetPanelBounds(const gfx::Rect& bounds) { 61 void Panel::SetPanelBounds(const gfx::Rect& bounds) {
62 if (expansion_state_ == Panel::EXPANDED) 62 if (expansion_state_ == Panel::EXPANDED)
63 restored_height_ = bounds.height(); 63 restored_height_ = bounds.height();
64 64
65 native_panel_->SetPanelBounds(bounds); 65 native_panel_->SetPanelBounds(bounds);
66
67 content::NotificationService::current()->Notify(
68 chrome::NOTIFICATION_PANEL_CHANGED_BOUNDS,
69 content::Source<Panel>(this),
70 content::NotificationService::NoDetails());
66 } 71 }
67 72
68 void Panel::SetMaxSize(const gfx::Size& max_size) { 73 void Panel::SetMaxSize(const gfx::Size& max_size) {
69 if (max_size_ == max_size) 74 if (max_size_ == max_size)
70 return; 75 return;
71 max_size_ = max_size; 76 max_size_ = max_size;
72 77
73 // Note: |render_view_host| might be NULL if the tab has not been created. 78 // Note: |render_view_host| might be NULL if the tab has not been created.
74 // If so, we will do it when NOTIFICATION_TAB_ADDED is received. 79 // If so, we will do it when NOTIFICATION_TAB_ADDED is received.
75 RenderViewHost* render_view_host = GetRenderViewHost(); 80 RenderViewHost* render_view_host = GetRenderViewHost();
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 RequestRenderViewHostToDisableScrollbars(GetRenderViewHost()); 597 RequestRenderViewHostToDisableScrollbars(GetRenderViewHost());
593 } 598 }
594 599
595 Browser* Panel::browser() const { 600 Browser* Panel::browser() const {
596 return native_panel_->GetPanelBrowser(); 601 return native_panel_->GetPanelBrowser();
597 } 602 }
598 603
599 void Panel::DestroyBrowser() { 604 void Panel::DestroyBrowser() {
600 native_panel_->DestroyPanelBrowser(); 605 native_panel_->DestroyPanelBrowser();
601 } 606 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698