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

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

Issue 9403035: Refactor intra-strip panel drags by introducing PanelDragController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix trybot Created 8 years, 10 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 "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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 web_app::GetExtensionIdFromApplicationName(browser->app_name()), false); 42 web_app::GetExtensionIdFromApplicationName(browser->app_name()), false);
43 } 43 }
44 44
45 Panel::Panel(Browser* browser, const gfx::Size& requested_size) 45 Panel::Panel(Browser* browser, const gfx::Size& requested_size)
46 : browser_(browser), 46 : browser_(browser),
47 panel_strip_(NULL), 47 panel_strip_(NULL),
48 initialized_(false), 48 initialized_(false),
49 has_temporary_layout_(false), 49 has_temporary_layout_(false),
50 restored_size_(requested_size), 50 restored_size_(requested_size),
51 auto_resizable_(false), 51 auto_resizable_(false),
52 draggable_(true),
53 expansion_state_(EXPANDED), 52 expansion_state_(EXPANDED),
54 old_expansion_state_(EXPANDED), 53 old_expansion_state_(EXPANDED),
55 app_icon_visible_(true) { 54 app_icon_visible_(true) {
56 } 55 }
57 56
58 Panel::~Panel() { 57 Panel::~Panel() {
59 // Invoked by native panel destructor. Do not access native_panel_ here. 58 // Invoked by native panel destructor. Do not access native_panel_ here.
60 } 59 }
61 60
62 void Panel::Initialize(const gfx::Rect& bounds) { 61 void Panel::Initialize(const gfx::Rect& bounds) {
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 native_panel_->ContentSizeFromWindowSize(max_size_)); 676 native_panel_->ContentSizeFromWindowSize(max_size_));
678 } 677 }
679 678
680 void Panel::OnWindowSizeAvailable() { 679 void Panel::OnWindowSizeAvailable() {
681 ConfigureAutoResize(browser()->GetSelectedWebContents()); 680 ConfigureAutoResize(browser()->GetSelectedWebContents());
682 } 681 }
683 682
684 void Panel::DestroyBrowser() { 683 void Panel::DestroyBrowser() {
685 native_panel_->DestroyPanelBrowser(); 684 native_panel_->DestroyPanelBrowser();
686 } 685 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698