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

Side by Side Diff: chrome/browser/ui/views/fullscreen_exit_bubble_views.cc

Issue 8508055: Move views::Accelerator to ui in order to use it from aura code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase 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
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/views/fullscreen_exit_bubble_views.h" 5 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/ui/views/bubble/bubble.h" 10 #include "chrome/browser/ui/views/bubble/bubble.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 Browser* browser, 223 Browser* browser,
224 const GURL& url, 224 const GURL& url,
225 FullscreenExitBubbleType bubble_type) 225 FullscreenExitBubbleType bubble_type)
226 : FullscreenExitBubble(browser, url, bubble_type), 226 : FullscreenExitBubble(browser, url, bubble_type),
227 root_view_(frame->GetRootView()), 227 root_view_(frame->GetRootView()),
228 popup_(NULL), 228 popup_(NULL),
229 size_animation_(new ui::SlideAnimation(this)) { 229 size_animation_(new ui::SlideAnimation(this)) {
230 size_animation_->Reset(1); 230 size_animation_->Reset(1);
231 231
232 // Create the contents view. 232 // Create the contents view.
233 views::Accelerator accelerator(ui::VKEY_UNKNOWN, false, false, false); 233 ui::Accelerator accelerator(ui::VKEY_UNKNOWN, false, false, false);
234 bool got_accelerator = frame->GetAccelerator(IDC_FULLSCREEN, &accelerator); 234 bool got_accelerator = frame->GetAccelerator(IDC_FULLSCREEN, &accelerator);
235 DCHECK(got_accelerator); 235 DCHECK(got_accelerator);
236 view_ = new FullscreenExitView( 236 view_ = new FullscreenExitView(
237 this, accelerator.GetShortcutText(), url, bubble_type_); 237 this, accelerator.GetShortcutText(), url, bubble_type_);
238 238
239 // Initialize the popup. 239 // Initialize the popup.
240 popup_ = new views::Widget; 240 popup_ = new views::Widget;
241 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 241 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
242 params.transparent = true; 242 params.transparent = true;
243 params.can_activate = false; 243 params.can_activate = false;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 size.set_height(size.height() - popup_bottom + y_offset); 361 size.set_height(size.height() - popup_bottom + y_offset);
362 origin.set_y(origin.y() - y_offset); 362 origin.set_y(origin.y() - y_offset);
363 } 363 }
364 return gfx::Rect(origin, size); 364 return gfx::Rect(origin, size);
365 } 365 }
366 366
367 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() { 367 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() {
368 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) 368 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_))
369 StartWatchingMouse(); 369 StartWatchingMouse();
370 } 370 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/html_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698