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

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

Issue 7129033: Adding a new window type for frameless non-transient top level windows, used by ChromeOS' window ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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/ui/views/bubble/bubble.h" 5 #include "chrome/browser/ui/views/bubble/bubble.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chrome/browser/ui/views/bubble/border_contents.h" 9 #include "chrome/browser/ui/views/bubble/border_contents.h"
10 #include "content/common/notification_service.h" 10 #include "content/common/notification_service.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 #if defined(OS_CHROMEOS) 62 #if defined(OS_CHROMEOS)
63 // static 63 // static
64 Bubble* Bubble::ShowFocusless( 64 Bubble* Bubble::ShowFocusless(
65 views::Widget* parent, 65 views::Widget* parent,
66 const gfx::Rect& position_relative_to, 66 const gfx::Rect& position_relative_to,
67 BubbleBorder::ArrowLocation arrow_location, 67 BubbleBorder::ArrowLocation arrow_location,
68 views::View* contents, 68 views::View* contents,
69 BubbleDelegate* delegate, 69 BubbleDelegate* delegate,
70 bool show_while_screen_is_locked) { 70 bool show_while_screen_is_locked) {
71 Bubble* bubble = new Bubble(views::Widget::InitParams::TYPE_POPUP, 71 Bubble* bubble = new Bubble(views::Widget::InitParams::TYPE_WINDOW_FRAMELESS,
72 show_while_screen_is_locked); 72 show_while_screen_is_locked);
73 bubble->InitBubble(parent, position_relative_to, arrow_location, 73 bubble->InitBubble(parent, position_relative_to, arrow_location,
74 contents, delegate); 74 contents, delegate);
75 return bubble; 75 return bubble;
76 } 76 }
77 #endif 77 #endif
78 78
79 void Bubble::Close() { 79 void Bubble::Close() {
80 if (show_status_ != kOpen) 80 if (show_status_ != kOpen)
81 return; 81 return;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #endif 127 #endif
128 #if defined(TOOLKIT_USES_GTK) 128 #if defined(TOOLKIT_USES_GTK)
129 border_contents_(NULL), 129 border_contents_(NULL),
130 #elif defined(OS_WIN) 130 #elif defined(OS_WIN)
131 border_(NULL), 131 border_(NULL),
132 #endif 132 #endif
133 delegate_(NULL), 133 delegate_(NULL),
134 show_status_(kOpen), 134 show_status_(kOpen),
135 fade_away_on_close_(false), 135 fade_away_on_close_(false),
136 #if defined(TOOLKIT_USES_GTK) 136 #if defined(TOOLKIT_USES_GTK)
137 type_(views::Widget::InitParams::TYPE_POPUP), 137 type_(views::Widget::InitParams::TYPE_WINDOW_FRAMELESS),
138 #endif 138 #endif
139 #if defined(OS_CHROMEOS) 139 #if defined(OS_CHROMEOS)
140 show_while_screen_is_locked_(false), 140 show_while_screen_is_locked_(false),
141 #endif 141 #endif
142 arrow_location_(BubbleBorder::NONE), 142 arrow_location_(BubbleBorder::NONE),
143 contents_(NULL) { 143 contents_(NULL) {
144 } 144 }
145 145
146 #if defined(OS_CHROMEOS) 146 #if defined(OS_CHROMEOS)
147 Bubble::Bubble(views::Widget::InitParams::Type type, 147 Bubble::Bubble(views::Widget::InitParams::Type type,
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 animation_->Hide(); 380 animation_->Hide();
381 } 381 }
382 382
383 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) { 383 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) {
384 if (!delegate_ || delegate_->CloseOnEscape()) { 384 if (!delegate_ || delegate_->CloseOnEscape()) {
385 DoClose(true); 385 DoClose(true);
386 return true; 386 return true;
387 } 387 }
388 return false; 388 return false;
389 } 389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698