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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10854017: Basic metro snap view omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos compilation. Created 8 years, 4 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/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 window_switcher_button_(NULL), 318 window_switcher_button_(NULL),
319 infobar_container_(NULL), 319 infobar_container_(NULL),
320 contents_container_(NULL), 320 contents_container_(NULL),
321 devtools_container_(NULL), 321 devtools_container_(NULL),
322 preview_container_(NULL), 322 preview_container_(NULL),
323 contents_(NULL), 323 contents_(NULL),
324 contents_split_(NULL), 324 contents_split_(NULL),
325 devtools_dock_side_(DEVTOOLS_DOCK_SIDE_BOTTOM), 325 devtools_dock_side_(DEVTOOLS_DOCK_SIDE_BOTTOM),
326 initialized_(false), 326 initialized_(false),
327 ignore_layout_(true), 327 ignore_layout_(true),
328 force_hide_tabstrip_(false),
328 #if defined(OS_WIN) && !defined(USE_AURA) 329 #if defined(OS_WIN) && !defined(USE_AURA)
329 hung_window_detector_(&hung_plugin_action_), 330 hung_window_detector_(&hung_plugin_action_),
330 ticker_(0), 331 ticker_(0),
331 #endif 332 #endif
332 force_location_bar_focus_(false), 333 force_location_bar_focus_(false),
333 ALLOW_THIS_IN_INITIALIZER_LIST(color_change_listener_(this)) { 334 ALLOW_THIS_IN_INITIALIZER_LIST(color_change_listener_(this)) {
334 browser_->tab_strip_model()->AddObserver(this); 335 browser_->tab_strip_model()->AddObserver(this);
335 } 336 }
336 337
337 BrowserView::~BrowserView() { 338 BrowserView::~BrowserView() {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // The background image starts tiling horizontally at the window left edge and 430 // The background image starts tiling horizontally at the window left edge and
430 // vertically at the top edge of the horizontal tab strip (or where it would 431 // vertically at the top edge of the horizontal tab strip (or where it would
431 // be). We expect our parent's origin to be the window origin. 432 // be). We expect our parent's origin to be the window origin.
432 gfx::Point window_point(point.Add(GetMirroredPosition())); 433 gfx::Point window_point(point.Add(GetMirroredPosition()));
433 window_point.Offset(frame_->GetThemeBackgroundXInset(), 434 window_point.Offset(frame_->GetThemeBackgroundXInset(),
434 -frame_->GetTabStripInsets(false).top); 435 -frame_->GetTabStripInsets(false).top);
435 return window_point; 436 return window_point;
436 } 437 }
437 438
438 bool BrowserView::IsTabStripVisible() const { 439 bool BrowserView::IsTabStripVisible() const {
439 return browser_->SupportsWindowFeature(Browser::FEATURE_TABSTRIP); 440 return (!force_hide_tabstrip_ &&
441 browser_->SupportsWindowFeature(Browser::FEATURE_TABSTRIP));
440 } 442 }
441 443
442 bool BrowserView::IsOffTheRecord() const { 444 bool BrowserView::IsOffTheRecord() const {
443 return browser_->profile()->IsOffTheRecord(); 445 return browser_->profile()->IsOffTheRecord();
444 } 446 }
445 447
446 bool BrowserView::IsGuestSession() const { 448 bool BrowserView::IsGuestSession() const {
447 return browser_->profile()->IsGuestSession(); 449 return browser_->profile()->IsGuestSession();
448 } 450 }
449 451
(...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2236 #endif 2238 #endif
2237 } 2239 }
2238 #if defined(OS_WIN) && !defined(USE_AURA) 2240 #if defined(OS_WIN) && !defined(USE_AURA)
2239 static_cast<views::NativeWidgetWin*>(frame_->native_widget())-> 2241 static_cast<views::NativeWidgetWin*>(frame_->native_widget())->
2240 PushForceHidden(); 2242 PushForceHidden();
2241 #endif 2243 #endif
2242 2244
2243 if (type == FOR_METRO) { 2245 if (type == FOR_METRO) {
2244 #if defined(OS_WIN) && !defined(USE_AURA) 2246 #if defined(OS_WIN) && !defined(USE_AURA)
2245 // Enter metro snap mode. 2247 // Enter metro snap mode.
2246 static_cast<views::NativeWidgetWin*>( 2248 force_hide_tabstrip_ = fullscreen;
2247 frame_->native_widget())->SetMetroSnapFullscreen(fullscreen); 2249 toolbar_->SetMetroSnapDisplayMode(fullscreen);
2248 #endif 2250 #endif
2249 } else { 2251 } else {
2250 // Toggle fullscreen mode. 2252 // Toggle fullscreen mode.
2251 frame_->SetFullscreen(fullscreen); 2253 frame_->SetFullscreen(fullscreen);
2252 } 2254 }
2253 2255
2254 browser_->WindowFullscreenStateChanged(); 2256 browser_->WindowFullscreenStateChanged();
2255 2257
2256 if (fullscreen) { 2258 if (fullscreen) {
2257 bool is_kiosk = 2259 bool is_kiosk =
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 if (contents && contents->GetContentNativeView() && 2588 if (contents && contents->GetContentNativeView() &&
2587 contents->GetContentNativeView()->HasFocus()) { 2589 contents->GetContentNativeView()->HasFocus()) {
2588 (contents->GetRenderViewHost()->*method)(); 2590 (contents->GetRenderViewHost()->*method)();
2589 return true; 2591 return true;
2590 } 2592 }
2591 #elif defined(OS_WIN) 2593 #elif defined(OS_WIN)
2592 // TODO(yusukes): Support non-Aura Windows. 2594 // TODO(yusukes): Support non-Aura Windows.
2593 #endif 2595 #endif
2594 return false; 2596 return false;
2595 } 2597 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/location_bar/location_bar_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698