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

Side by Side Diff: chrome/browser/chromeos/frame/panel_browser_view.cc

Issue 7945014: Applied review comments from oshima for CL 7850026. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 3 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) 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/chromeos/frame/panel_browser_view.h" 5 #include "chrome/browser/chromeos/frame/panel_browser_view.h"
6 6
7 #include "chrome/browser/chromeos/frame/browser_view.h" 7 #include "chrome/browser/chromeos/frame/browser_view.h"
8 #include "chrome/browser/chromeos/frame/panel_controller.h" 8 #include "chrome/browser/chromeos/frame/panel_controller.h"
9 #include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h" 9 #include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h"
10 #include "views/widget/widget.h" 10 #include "views/widget/widget.h"
(...skipping 16 matching lines...) Expand all
27 creator_xid_(0) { 27 creator_xid_(0) {
28 } 28 }
29 29
30 PanelBrowserView::~PanelBrowserView() {} 30 PanelBrowserView::~PanelBrowserView() {}
31 31
32 //////////////////////////////////////////////////////////////////////////////// 32 ////////////////////////////////////////////////////////////////////////////////
33 // PanelBrowserView functions 33 // PanelBrowserView functions
34 34
35 void PanelBrowserView::LimitBounds(gfx::Rect* bounds) const { 35 void PanelBrowserView::LimitBounds(gfx::Rect* bounds) const {
36 #if defined(USE_AURA) 36 #if defined(USE_AURA)
37 // TODO(saintlou): Need PureViews panels? 37 // TODO(saintlou): Need PureViews
38 bounds->set_width(kPanelDefaultWidthPixels);
39 bounds->set_height(kPanelDefaultHeightPixels);
40 #else 38 #else
41 GdkScreen* screen = gtk_widget_get_screen(GetWidget()->GetNativeView()); 39 GdkScreen* screen = gtk_widget_get_screen(GetWidget()->GetNativeView());
42 int max_width = gdk_screen_get_width(screen) * kPanelMaxWidthFactor; 40 int max_width = gdk_screen_get_width(screen) * kPanelMaxWidthFactor;
43 int max_height = gdk_screen_get_height(screen) * kPanelMaxHeightFactor; 41 int max_height = gdk_screen_get_height(screen) * kPanelMaxHeightFactor;
44 42
45 if (bounds->width() == 0 && bounds->height() == 0) { 43 if (bounds->width() == 0 && bounds->height() == 0) {
46 bounds->set_width(kPanelDefaultWidthPixels); 44 bounds->set_width(kPanelDefaultWidthPixels);
47 bounds->set_height(kPanelDefaultHeightPixels); 45 bounds->set_height(kPanelDefaultHeightPixels);
48 } 46 }
49 47
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 171
174 void PanelBrowserView::ClosePanel() { 172 void PanelBrowserView::ClosePanel() {
175 Close(); 173 Close();
176 } 174 }
177 175
178 void PanelBrowserView::ActivatePanel() { 176 void PanelBrowserView::ActivatePanel() {
179 Activate(); 177 Activate();
180 } 178 }
181 179
182 } // namespace chromeos 180 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/frame/bubble_window_views.cc ('k') | chrome/browser/chromeos/frame/panel_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698