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

Side by Side Diff: chrome/browser/ui/views/notifications/balloon_view_host.cc

Issue 8632001: Removed TOUCH_UI (mostly constants) from chrome/browser/ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 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 | 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/notifications/balloon_view_host.h" 5 #include "chrome/browser/ui/views/notifications/balloon_view_host.h"
6 6
7 #include "chrome/browser/notifications/balloon.h" 7 #include "chrome/browser/notifications/balloon.h"
8 #include "content/browser/renderer_host/render_view_host.h" 8 #include "content/browser/renderer_host/render_view_host.h"
9 #include "content/browser/renderer_host/render_widget_host_view.h" 9 #include "content/browser/renderer_host/render_widget_host_view.h"
10 #include "content/browser/tab_contents/tab_contents.h" 10 #include "content/browser/tab_contents/tab_contents.h"
11 #include "content/public/browser/content_browser_client.h" 11 #include "content/public/browser/content_browser_client.h"
12 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
13 13
14 #if defined(TOUCH_UI) && !defined(USE_AURA)
15 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
16 #endif
17
18 class BalloonViewHostView : public views::NativeViewHost { 14 class BalloonViewHostView : public views::NativeViewHost {
19 public: 15 public:
20 explicit BalloonViewHostView(BalloonViewHost* host) 16 explicit BalloonViewHostView(BalloonViewHost* host)
21 : host_(host), 17 : host_(host),
22 initialized_(false) { 18 initialized_(false) {
23 } 19 }
24 20
25 virtual void ViewHierarchyChanged(bool is_add, 21 virtual void ViewHierarchyChanged(bool is_add,
26 views::View* parent, 22 views::View* parent,
27 views::View* child) { 23 views::View* child) {
(...skipping 19 matching lines...) Expand all
47 BalloonViewHost::~BalloonViewHost() { 43 BalloonViewHost::~BalloonViewHost() {
48 Shutdown(); 44 Shutdown();
49 } 45 }
50 46
51 void BalloonViewHost::Init(gfx::NativeView parent_native_view) { 47 void BalloonViewHost::Init(gfx::NativeView parent_native_view) {
52 parent_native_view_ = parent_native_view; 48 parent_native_view_ = parent_native_view;
53 BalloonHost::Init(); 49 BalloonHost::Init();
54 50
55 RenderWidgetHostView* render_widget_host_view = 51 RenderWidgetHostView* render_widget_host_view =
56 tab_contents_->render_view_host()->view(); 52 tab_contents_->render_view_host()->view();
57 #if defined(TOUCH_UI) && !defined(USE_AURA) 53
58 RenderWidgetHostViewViews* view_views =
59 static_cast<RenderWidgetHostViewViews*>(render_widget_host_view);
60 native_host_->AttachToView(view_views);
61 #else
62 native_host_->Attach(render_widget_host_view->GetNativeView()); 54 native_host_->Attach(render_widget_host_view->GetNativeView());
63 #endif
64 } 55 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698